On Sun, May 17, 2009 at 08:51:38AM -0300, Eduardo M KALINOWSKI wrote:

> As other people have pointed out, the way to capture a command's output
> is with $(command) (or `command`, though this is a bashism). 

$(command) is bashism. `command` is the "pure" bourne shell form.

$ posh
$ echo `echo hi`
hi
$ echo $(echo hi)
hi


And likewise on dash and busybox ash, which are the other shells I have
here. IIRC latest posix includes $(command) as well.

-- 
Tzafrir Cohen         | [email protected] | VIM is
http://tzafrir.org.il |                    | a Mutt's
[email protected] |                    |  best
ICQ# 16849754         |                    | friend


-- 
To UNSUBSCRIBE, email to [email protected] 
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to