annoying BASH does not interpret quotation marks right?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

I'm trying to parse a list of videos I have to convert them to a different format. The video names
have spaces in them so I do something like:

for file in *.flv ; do ffmpeg -i \"${file}\" \"${file}.avi\" ; done

but the quotmarks do not work and ffmpeg is not fed the whole video name but only the
part up to the first space so it fails. On the contrary if I just echo the whole command like:

for file in *.flv ; do echo ffmpeg -i \"${file}\" \"${file}.avi\" ; done

I get exactly what I expect which is the ffmpeg command with the full file names enclosed in
quotemarks. if I just highlight that output and paste it back on the command prompt it runs like
a charm.

So what am I missing? Why echoing the command works but running it doesn't?

I tried to escape some more (in case the escape characters needed to be escaped to no avail).

Help!
Filippos

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux