Bash tricks (was: Converting mp3 to wav)

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Eric Thelin
Date:  
Old-Topics: Converting mp3 to wav
Subject: Bash tricks (was: Converting mp3 to wav)
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                                          
           AZtechBiz.com: Where Arizona Does Tech Business