Thank you sir. I did try this out and ran into one small problem and not sure if its a question of syntax or a question of how I'm envoking the script. when putting the script into a directory of mp3 files and just running it with no arguments, I get the following. =: ERROR: cannot open `=' (No such file or directory) Foreigner: ERROR: cannot open `Foreigner' (No such file or directory) play_file: Cannot open Foreigner for reading. Now if I understand correctly, the file = "${file/%.mp3/}" is the variable that the output of ls would be used to take the variable and substitue that for the actual name. Not sure of the purpose of the brackets and slashes, but yes some of these files will have names using the dash, underscore, and in some cases spaces and the like. Do I understand correctly? Thanks for your help, if we can get this going, I'll give you the credit and call taht a nice donation for those of us who choose not to use windows vbs to accomplish what can be done with Linux...grin tnx Scott >-----BEGIN PGP SIGNED MESSAGE----- >Hash: RIPEMD160 > >On Sun, Jul 31, 2005 at 07:10:41 PM -0400, Scott Howell wrote: >> This is off topic I know, but I have a question regarding how to perform >> a certain task. > >Well off topic messages are the spice of life, where would we be without >them. Besides this one is a lot more topical than most. > >> I've got a directory of files, I want to take each name of a file and >> put it into a separate mp3 file, i.e. song1.mp3 would have a file called >> song1.talk associated with it. >> Now I will use the DECtalk software to do this. I will have say speak >> the file name and then pipe that using a simi colon into sox to make a >> wav or mp3 file whichever. >> In any case the problem is I'm not so sure how to feed say each file >> name. I suspect using a loop statement (if that's the correct term) in a >> script that would feed the file names from ls into say and on from >> there. >> My thought was along these lines and any help appreciated. Not a Bash >> expert. > >Well here goes nothing I hope this is at least close to what you're >after. > >for file in `/bin/ls *.mp3`; do >file = "${file/%.mp3/}" > say -a "$file" -fo "${file}.tmp" > lame "${file}.tmp" -o "${file}.talk" > rm "${file}.tmp"; >done > >This is a little more complicated than you asked for, but it >removes the .mp3 from the ends of the file names and says them >using dectalk, then it uses lame to encode the result. My >version of sox could only read not write mp3's so I had to use >lame instead. > >Now the next even cooler step would be to make the whole thing >recursive so it could handlke an entire tree of music all sorted >by artist and album, but I don't know if i'm up for that right >now. > >HTH > >- -- >"Debugging is twice as hard as writing the code in the first place. >Therefore, if you write the code as cleverly as possible, you are, >by definition, not smart enough to debug it." - Brian W. Kernighan > >Thomas Stivers e-mail: stivers_t at tomass.dyndns.org >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.4.1 (GNU/Linux) > >iD8DBQFC7XUE5JK61UXLur0RA/yuAJ9CodJhtRlM+C25b0BLPG4N06yQ9gCeM4k1 >GLSxQrlvaXeRa0ITJSBv1v8= >=Ly2K >-----END PGP SIGNATURE----- > >_______________________________________________ >Speakup mailing list >Speakup at braille.uwo.ca >http://speech.braille.uwo.ca/mailman/listinfo/speakup