Re: bash scripting question
From: Chris F.A. Johnson (c.f.a.johnson_at_rogers.com)
Date: 08/10/03
- Next message: Len Philpot: "Re: Small database recommendations ?"
- Previous message: Francisco: "Re: bash scripting question"
- In reply to: Francisco: "Re: bash scripting question"
- Next in thread: Peter T. Breuer: "Re: bash scripting question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 10 Aug 2003 18:02:47 GMT
On Sun, 10 Aug 2003 at 17:57 GMT, Francisco wrote:
>> for n in *.mps
>> do
>> lame --decode "$n"
>> done
>>
>
> Thank you for all the responses, it was so simple.
> But I have a book called "Linux System Administration" by Vicky Stanfield
> and Roderick W. Smith that has the following example to play various wav
> files:
> for d in `ls *.wav`; do play $d; done
>
> And then a big "Warning":
> "This loop syntax uses spaces to delineate files, so if a filename includes
> a space, your script won't be able to parse the files correctly. [...] This
> is one of the reasons experienced Linux users don't create files with
> spaces in their names."
Get a new book; that is NEVER the correct way.
> Instead of giving this simple solution to the problem it suggests to use
> file names without spaces in it. I dont understand why.
Many scripts will fail when they have to deal with file names
containing spaces; it's not hard to accommodate them, but their
use is fairly recent (not to mention an abomination) and many
scripts predate the influx of Windows-type file names.
--
Chris F.A. Johnson http://cfaj.freeshell.org
===================================================================
My code (if any) in this post is copyright 2003, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Len Philpot: "Re: Small database recommendations ?"
- Previous message: Francisco: "Re: bash scripting question"
- In reply to: Francisco: "Re: bash scripting question"
- Next in thread: Peter T. Breuer: "Re: bash scripting question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|