bash scripting question

From: Francisco (fran575_at_mailandnews.com)
Date: 08/10/03


Date: Sun, 10 Aug 2003 03:13:45 -0300

Say I want to decode with lame a lot of files in one dir, I do the
following:
for n in `ls *.mp3`;do lame --decode $n; done

This works great if files dont have spaces, but if there are spaces the
scripts fails because $n cantains only the fragment of the files names
until a space occur.
So, is there a solution to this?, how should I do it?
Thank you.



Relevant Pages

  • Re: bash scripting question
    ... Francisco wrote: ... >Say I want to decode with lame a lot of files in one dir, ... >This works great if files dont have spaces, but if there are spaces the ...
    (comp.os.linux.misc)
  • Re: bash scripting question
    ... On Sun, 10 Aug 2003 at 06:13 GMT, Francisco wrote: ... > Say I want to decode with lame a lot of files in one dir, ...
    (comp.os.linux.misc)
  • Re: sample grabber question
    ... This works fine, but, I also need to decode m4a files. ... grabber does not seem to decode these and the files dont even play in my ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: sample grabber question
    ... This works fine, but, I also need to decode m4a files. ... Ths sample ... grabber does not seem to decode these and the files dont even play in my ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: bash scripting question
    ... > Say I want to decode with lame a lot of files in one dir, ... Then it doesn't matter if there are spaces in the filenames, ... the 'find' command to avoid recursing into subdirectories. ... may also work, and be slightly faster, if lame behaves the way I hope it ...
    (comp.os.linux.misc)