Thanks! That did it (no backlashes)!!!<br><br>Filippos<br><br><br><div><span class="gmail_quote">On 5/7/06, <b class="gmail_sendername">Robert Nichols</b> <<a href="mailto:rnicholsNOSPAM@comcast.net">rnicholsNOSPAM@comcast.net
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Filippos Klironomos wrote:<br>> Hello list,<br>><br>> I'm trying to parse a list of videos I have to convert them to a
<br>> different format. The video names<br>> have spaces in them so I do something like:<br>><br>> for file in *.flv ; do ffmpeg -i \"${file}\" \"${file}.avi\" ; done<br>><br>> but the quotmarks do not work and ffmpeg is not fed the whole video name
<br>> but only the<br>> part up to the first space so it fails. On the contrary if I just echo<br>> the whole command like:<br>><br>> for file in *.flv ; do echo ffmpeg -i \"${file}\" \"${file}.avi\" ; done
<br>><br>> I get exactly what I expect which is the ffmpeg command with the full<br>> file names enclosed in<br>> quotemarks. if I just highlight that output and paste it back on the<br>> command prompt it runs like
<br>> a charm.<br><br>In both cases bash is doing exactly what it should, and that is NOT<br>passing a quote-enclosed file name as you think it is.  If you have<br>a file named<br><br>           Some file name.fli<br><br>
that is getting passed as three separate arguments:<br><br>       '"Some'    'file'    'name.avi"'<br><br>where I have inserted single quote marks to delimit the arguments.<br>The echo command will, of course, display that as:
<br><br>        "Some file name.avi"<br><br>which looks like what you want, but isn't.<br><br>Just leave out the backslashes in your command.  That will let the<br>shell pass each file name as a single argument with embedded white
<br>space, and ffmpeg should be happy with that.  If, for some reason,<br>you really wanted to pass the file name with enclosing quote marks,<br>you would have to do it this way:<br><br>for file in *.flv ; do echo "\"${file}\"" "\"${file}.avi\"" ; done
<br><br>--<br>Bob Nichols         Yes, "NOSPAM" is really part of my email address.<br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: 
<a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a><br></blockquote></div><br>