Re: shell script question
On Sun, 12 Oct 2003 23:18:11 -0400 Jeff Elkins wrote:
> In the same vein, I'm working through a list of mp3s where some of them need
> re-encoding. First, I convert them to wavs with this script fragment:
> mpg123 -b 10000 -s "$1" | sox -t raw -r 44100 -s -w -c2 - "$2"
> where I feed the script $1 (input) and $2 (output). In every case, $1 and $2
> are the same, except for $2 I want the output filename to have a .wav
> Could I alter the script to eliminate entering $2, since the basic filename is
> the same?
man basename (the suffix bit).