Converting mp3 to wav

der.hans plug-discuss@lists.plug.phoenix.az.us
Mon, 28 Jan 2002 22:30:18 -0700 (MST)


Am 28. Jan, 2002 schwätzte Lynn David Newton so:

> Yes, better still. I wasn't sure that functionality was available in bash.

bash is quite the mutt. It's taken features from lots of places. It seems
they have definitely tried to take in the good features of ksh and csh.
They've also gone after zsh features by getting programmable completion in
there.

> 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? 

> didn't know if that worked in bash either. But Hans' superior (and faster)
> version obviates the need for running a command entirely.

Yeah, execing an outside call slows things down. For the most part that
isn't that big a deal. If it was you wouldn't be writing in shell ;-).

> I just remembered what it was that I discovered bash does not have that ksh
> does, namely "print". All my ksh shell scripts use print rather than echo,
> including its sophisticated options to write to file descriptors:
> 
> exec 3>somelogfile
> exec 4<someinput
> 
> while read -u4 first second third
> do
>   if [[ $first != $whateverexpected ]]
>   then
>     print -u3 "some log message"
>   fi
> done
> 
> etc. Don't know if there is a bash equivalent for that. Probably, but I
> never stopped to learn.

There is. In fact I think it was in plain old bourne shell. Seems to be that
Tom Christenson ( yes, the perl dude ) was the one who wrote the paper I
read that had info on using multiple pipes.

Yup, here's a URL. http://www.perl.com/language/versus/csh.whynot

If I understand your example above this should cover you.

You could make print an alias to the correct echo command.

ciao,

der.hans
-- 
#  http://home.pages.de/~lufthans/   http://www.DevelopOnline.com/
#  You can't handle the source! - der.hans