From owner-freebsd-questions Sat Dec 1 20:34:43 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id CFC9037B405; Sat, 1 Dec 2001 20:34:41 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id 71A63BD10; Sat, 1 Dec 2001 20:34:41 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id UAA03639; Sat, 1 Dec 2001 20:34:41 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id fB24Yv411182; Sat, 1 Dec 2001 20:34:57 -0800 (PST) (envelope-from swear@blarg.net) To: "Crist J . Clark" Cc: Darren Pilgrim , freebsd-questions@FreeBSD.ORG Subject: Re: Changing $IFS in a bash shell References: <3C097584.B51ECEBC@pantherdragon.org> <20011201173255.N13613@blossom.cjclark.org> From: swear@blarg.net (Gary W. Swearingen) Date: 01 Dec 2001 20:34:57 -0800 In-Reply-To: <20011201173255.N13613@blossom.cjclark.org> Message-ID: Lines: 19 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > 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="). 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