Bash and Single Quotes
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Sun Jan 11 03:40:13 UTC 2009
RGH wrote:
>
> I'm trying to write a shell script to convert video files using vlc and
> avidemux, and I've run into a problem. I need to be able to do something
> like this:
>
> vlc -v -I dummy $FIL
> --sout='#transcode{vcodec=dummy,acodec=mp3,ab=192}:std{access=file,mux=dummy,dst="$MP3"}'
> vlc://quit
>
> But of course this doesn't work because the $MP3 variable doesn't get
> expanded in single quotes. The single quotes seem to need to be there to
> protect the "{", though. So, how can this be done?
>
> Cheers,
> rh
>
You should be able escape the { by using a \ before it.
\{ in place of {. It should also work for any other special characters.
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090110/dbe56c80/attachment-0001.sig>
More information about the fedora-list
mailing list