Re: bash scripts misrepresenting white space

2003-12-26 Thread Colin Watson
On Thu, Dec 25, 2003 at 09:32:05PM -0500, Johann Koenig wrote: > I tried reading the man page and the BASH Programming HOWTO, but I > couldn't really get what I needed out of either. A friend of mine wrote an article on common mistakes in shell programming, which may help you: http://www.greene

Re: bash scripts misrepresenting white space

2003-12-26 Thread Dan Lenski
On Thu, 2003-12-25 at 21:32, Johann Koenig wrote: > I tried reading the man page and the BASH Programming HOWTO, but I > couldn't really get what I needed out of either. Oh well, with you're > example to guide me, I got it right. If anybodies willing, please look > over the attached script and give

Re: bash scripts misrepresenting white space

2003-12-25 Thread Johann Koenig
On Thursday December 25 at 08:45pm Simon Law <[EMAIL PROTECTED]> wrote: > On Thu, Dec 25, 2003 at 07:44:16PM -0500, Johann Koenig wrote: > > I try, for example: > > for i in `ls` > > do > > echo $i > > done > > You want: > > for i in * > do > echo "$i" > done > > which will

Re: bash scripts misrepresenting white space

2003-12-25 Thread Simon Law
On Thu, Dec 25, 2003 at 07:44:16PM -0500, Johann Koenig wrote: > I try, for example: > for i in `ls` > do > echo $i > done You want: for i in * do echo "$i" done which will do what you probably want. I'd suggest consulting the Bash info manual which should tell you what you

bash scripts misrepresenting white space

2003-12-25 Thread Johann Koenig
I'm trying to write a script to create mp3s from flacs, and so far I've figured out a pretty easy way to do it: flac -d 01\ Kaneda.flac -c | lame -h -b 192 - 01\ Kaneda.mp3 followed by id3cp 01\ Kaneda.flac 01\ Kaneda.mp3 (flacs handle id3 tags very nicely) Of course, I would love to script this.