Re: Non-POSIX shells
- From: ERDI Gergo <cactus cactus rulez org>
- To: Sander Vesik <Sander Vesik Sun COM>
- Cc: Havoc Pennington <hp redhat com>, gnome-hackers gnome org
- Subject: Re: Non-POSIX shells
- Date: Tue, 5 Mar 2002 23:10:55 +0100 (CET)
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]