Re: Non-POSIX shells



On Tue, 5 Mar 2002, Sander Vesik wrote:

> You sure it's "$(varname)" and not "${varname}" ?

${} is for using a variable
$() is for running a command and returning its output

i.e.

FOO="foo"
BAR=${FOO}       # $BAR will be "foo"
BAZ=$(echo quux) # $BAZ will be "quux"

-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
F U CN RD THS U CNT SPL WRTH A DM!

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



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