scripting

Anderson Lizardo lizardo at linuxfromscratch.org
Sun Jul 11 13:06:32 PDT 2004


On Sunday 11 July 2004 15:48, Ian Molton wrote:
> On Sun, 11 Jul 2004 19:09:43 +0200
>
> Dan Osterrath <Dan.Osterrath at gmx.de> wrote:
> > Quoting?
> >
> > for i in "file 1" "file 2" ; echo $i ; done
>
> I tried that. didnt seem to work.

Try this:

( IFS=""; for i in a b c d e ; do <foo>; done )

The parenthesis are important if you are going to use this code on a script, 
otherwise the IFS variable will be changed globally and not locally.

-- 
Anderson Lizardo
lizardo at linuxfromscratch.org
http://www.linuxfromscratch.org/



More information about the lfs-chat mailing list