Date: Sat, 23 Aug 2008 09:08:16 -0400 From: Robert Huff <roberthuff@rcn.com> To: RW <fbsd06@mlists.homeunix.com> Cc: freebsd-questions@freebsd.org Subject: Re: space char shell script problem Message-ID: <18608.3008.834882.196551@jerusalem.litteratus.org> In-Reply-To: <20080823124145.6843f951@gumby.homeunix.com.> References: <20080823101941.GA42601@skytracker.ca> <20080823124145.6843f951@gumby.homeunix.com.>
next in thread | previous in thread | raw e-mail | index | archive | help
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 variable. It's a string, normally set to space and tab; set it to newline and good things can happen. Robert Huff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18608.3008.834882.196551>