On Thu, 24 Apr 2014 13:34:21 +0100 steve-ALUG@hst.me.uk wrote:
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?
Nope.
Input Filename: 01 - You Don't Have To Say You Love Me.ogg.mp3 Output Filename: 01 - You Don't Have To Say You Love Me.ogg.mp2 Failed to open input file (01 - You Don't Have To Say You Love Me.ogg.mp3): System error : No such file or directory.
Alternatively, single quote ' or the character on the Pipe key, which I believe is called "tick" may work
That didn't work either but with a different error :- bash: 02: command not found bash: 02: command not found twolame: option requires an argument -- 'b'
In theory, a "tick" follows this colon: `
It did :-)