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

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.

2) The Unix newline character is ^J (line feed), 
not ^M (carriage return).

3) In ksh shell, this works:  IFS="\n"

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?ausnaup7da.nau>