On 24/04/14 12:21, Chris Walker wrote:
Hello,
I need more help please.
I'm trying to make my machine convert some .ogg files to mp3 using twolame (my distro doesn't have lame, only twolame) and I'm trying to do it like this :-
for t in {01..15}*.ogg; do twolame -b 320 $t $t.mp3; done
but it's failing with this message 'Usage: twolame [options] <infile> [outfile]'
All the filenames are like this '02 - I Close My Eyes And Count To Ten.ogg' with perhaps 15 or so tracks per folder.
In order to find my error, I tried this - for t in {01..15}*.ogg;do echo 'found tracks '$t;done and that lists all 15 tracks but despite hacking away for almost an hour, I can't persuade it to convert the files.
So what *should* I be typing to make this work?
Guessing here, but I think it's the spaces. If it's the spaces, you'll have to work out either a way to escape all of them with a "\ " (using sed perhaps?), or perhaps simpler, you may find that your distro accepts quotes.
Does for t in {01..15}*.ogg; do twolame -b 320 "$t" "$t.mp3"; done work? Alternatively, single quote ' or the character on the Pipe key, which I believe is called "tick" may work In theory, a "tick" follows this colon: `
HTH Steve