Re: space char shell script problem

2008-08-24 Thread Derek Ragona
At 05:19 AM 8/23/2008, David Banning wrote: I am running into a problem with the space character in filenames. For instance, If I want to run the script; for x in `ls` do echo $x done then filenames that have a space in them ie: "john smith.jpg" are processed by my script as two names, "john"

Re: space char shell script problem

2008-08-23 Thread Matthew Seaman
Polytropon wrote: Well, it's completely possible to create a file name like: This is my *favourite* photo from "Cats" \ by Bob & Jane / my wife ~ 2008 `musical'.JPG Um... actually you cannot create that as a filename on UFS. There are precisely two characters you cannot use in a filename.

Re: space char shell script problem

2008-08-23 Thread Polytropon
On Sat, 23 Aug 2008 10:16:36 -0400, Thomas Dickey <[EMAIL PROTECTED]> wrote: > spaces won't go away, and since they're legal in filenames, one may as > well handle them. Well, it's completely possible to create a file name like: This is my *favourite* photo from "Cats" \ by Bob & Jane / my wife ~

Re: space char shell script problem

2008-08-23 Thread Thomas Dickey
On Sat, Aug 23, 2008 at 04:09:57PM +0200, Polytropon wrote: > On Sat, 23 Aug 2008 06:19:42 -0400, David Banning <[EMAIL PROTECTED]> wrote: > > I am running into a problem with the space character in filenames. > > For instance, If I want to run the script; > > > > for x in `ls` > > do > > echo $

Re: space char shell script problem

2008-08-23 Thread Polytropon
On Sat, 23 Aug 2008 06:19:42 -0400, David Banning <[EMAIL PROTECTED]> wrote: > I am running into a problem with the space character in filenames. > For instance, If I want to run the script; > > for x in `ls` > do > echo $x > done > > then filenames that have a space in them ie: "john smith.jpg

Re: space char shell script problem

2008-08-23 Thread Robert Huff
RW writes: > > I am running into a problem with the space character in filenames. > > For instance, If I want to run the script; > > > > for x in `ls` > > do > > echo $x > > done > > for x in * There's the (poorly documented, IMO) IFS (internal field separator) shell variabl

Re: space char shell script problem

2008-08-23 Thread RW
On Sat, 23 Aug 2008 06:19:42 -0400 David Banning <[EMAIL PROTECTED]> wrote: > I am running into a problem with the space character in filenames. > For instance, If I want to run the script; > > for x in `ls` > do > echo $x > done for x in * ___ freeb