Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Dec 2001 14:32:01 -0800
From:      Darren Pilgrim <dmp@pantherdragon.org>
To:        "Gary W. Swearingen" <swear@blarg.net>
Cc:        "Crist J . Clark" <cjc@FreeBSD.ORG>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Changing $IFS in a bash shell
Message-ID:  <3C0AABE1.1DB4F9EC@pantherdragon.org>
References:  <3C097584.B51ECEBC@pantherdragon.org> <20011201173255.N13613@blossom.cjclark.org> <ausnaup7da.nau@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
I solved this one on the command line:

$ IFS="
> "

This gives the result I want insofar as how item list word-splitting
works now:

$ ls
file 1  file 2  file 3  file 4
$ for dir in `find * -type f` ; do echo -n "test "; echo ${dir}; done
test file 1
test file 2
test file 3
test file 4

Now, how do I do the above in a script?  Like this?

IFS="
"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C0AABE1.1DB4F9EC>