>> for i in *.mp3 >> do >> j=`basename $i .mp3` >> mp32wav $i $j.wav >> done > for i in *.mp3 > do > mp32wav $i ${i%mp3}wav > # use a hash, #, to change something at the front > done Yes, better still. I wasn't sure that functionality was available in bash. 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 didn't know if that worked in bash either. But Hans' superior (and faster) version obviates the need for running a command entirely. 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