Bash tricks (was: Converting mp3 to wav)

Eric Thelin plug-discuss@lists.plug.phoenix.az.us
Tue, 29 Jan 2002 13:00:04 -0700 (MST)


On Mon, 28 Jan 2002, der.hans wrote:

> Am 28. Jan, 2002 schwätzte Lynn David Newton so:
>
> > Also, the hipper way to write command evaluation is not with backticks, but
> > with $(...), i.e., $(basename $i .mp3) rather than `basename $i .mp3`, but
>
> Is there a difference in execution? I'm used to backticks, they work in
> perl, why not keep using them?

The difference is that with the $(cmd) notation you can nest them.  Such
as echo $(cmd1 $(cmd2)).  Given most situations nesting can be avoided
but it is convenient in some cases and proves once again that bash rocks.

Eric


-- 
Eric Thelin                                          erict@aztechbiz.com
           AZtechBiz.com: Where Arizona Does Tech Business