Date: Sat, 1 Dec 2001 21:58:16 -0800 From: "Crist J . Clark" <cristjc@earthlink.net> To: "Gary W. Swearingen" <swear@blarg.net> Cc: Darren Pilgrim <dmp@pantherdragon.org>, freebsd-questions@FreeBSD.ORG Subject: Re: Changing $IFS in a bash shell Message-ID: <20011201215816.P13613@blossom.cjclark.org> In-Reply-To: <ausnaup7da.nau@localhost.localdomain>; from swear@blarg.net on Sat, Dec 01, 2001 at 08:34:57PM -0800 References: <3C097584.B51ECEBC@pantherdragon.org> <20011201173255.N13613@blossom.cjclark.org> <ausnaup7da.nau@localhost.localdomain>
index | next in thread | previous in thread | raw e-mail
On Sat, Dec 01, 2001 at 08:34:57PM -0800, Gary W. Swearingen wrote:
> > > IFS=^M
> > >
> > > What is the proper way to change $IFS?
> >
> > I would expect the last one to work if '^M' is a _literal_ '^M' (that
> > is your keystrokes are, "IFS=<crtl-v><enter><enter>"). However, I
> > think,
> >
> > IFS="\
> > "
> >
> > Is probably the "cleanest" way to do it.
>
> 1) I think that sets IFS to nothing since it escapes the newline.
Sorry,
$ IFS="
"
> 2) The Unix newline character is ^J (line feed),
> not ^M (carriage return).
Good point. It would be,
IFS=<ctrl-v><ctrl-j><enter>
Above, but that doesn't seem to work...
> 3) In ksh shell, this works: IFS="\n"
But it doesn't work in bash.
--
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011201215816.P13613>
