Date: 02 Dec 2001 15:01:11 -0800 From: swear@blarg.net (Gary W. Swearingen) To: cjclark@alum.mit.edu Cc: Darren Pilgrim <dmp@pantherdragon.org>, freebsd-questions@FreeBSD.ORG Subject: Re: Changing $IFS in a bash shell Message-ID: <6tg06tp6q0.06t@localhost.localdomain> In-Reply-To: <20011201215816.P13613@blossom.cjclark.org> References: <3C097584.B51ECEBC@pantherdragon.org> <20011201173255.N13613@blossom.cjclark.org> <ausnaup7da.nau@localhost.localdomain> <20011201215816.P13613@blossom.cjclark.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Crist J . Clark" <cristjc@earthlink.net> writes: > > 3) In ksh shell, this works: IFS="\n" > > But it doesn't work in bash. So I thought I would give another one-liner that does, but I see that bash, sh and ksh all strip trailing newlines with things like: XXX=$(printf '\n') XXX=`echo` Except that ksh (only) will leave in a newline with: XXX=$(printf '\\n') Tested with: echo -n "$XXX" | hd 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?6tg06tp6q0.06t>