"Ken" == Ken Brush <[EMAIL PROTECTED]> writes:
Carla> Is there a more streamlined way to do this? or a better utility Carla> than sox?
Ken> Try using basename Here's the example:
Ken> for i in `ls *.wav`; do echo -e "$i"; sox $i `basename $i Ken> .wav`.cdr; done
The backtick stuff is not necessary. Howsabout:
$ for i in *.wav ; do echo $i ; sox $i ${i%%.wav}.cdr ; done
How portable is the "${var%%.str}" syntax?
Being a bit of a curmudgeon, I tend to script with a Bourne shell (sh) only syntax, as the script might wind up on a Unix system which does not have bash. But, like Carla, I keep finding new tricks even in old familiar programs.
_______________________________________________ PDXLUG mailing list [EMAIL PROTECTED] http://pdxlug.org/mailman/listinfo/pdxlug
