On Mon, 10 May 2004, Chad Perrin wrote:
> Eben King wrote:
>
> >>mplayer $song
> >>
> >>Note the 'export' and the lack of quotes around $song.
> >
> >Also the lack of $ . Is it necessary that there be no quotes?
>
> I don't know a whole lot about shell scripts, but I know that in some
> scripting and programming languages placing a variable in double-quotes
> will cause the script/program to treat it as a string rather than a
> variable name. Is that the case in bash?
No. If you type
/bin/foo 1 2
foo gets two arguments, '1' and '2'. You get the same invocation as if
you had typed
/bin/foo "1" "2"
It's up to /bin/foo whether to treat them as 0x01 and 0x02 or ASCII 0x32
and 0x33. If you type
/bin/foo "1 2"
foo gets one argument, '1 2'. All this is based on what interprets your
typing, but this is usually how it's done.
-- -eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.tampabay.rr.com/hactar SAGITTARIUS: All your friends are laughing behind your back... kill them. Take down all those naked pictures of Ernest Borgnine you've got hanging in your den. -- Weird Al, _Your Horoscope for Today_----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:05:38 EDT