From owner-freebsd-questions Sun Dec 2 16: 1:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from spork.pantherdragon.org (spork.pantherdragon.org [206.29.168.146]) by hub.freebsd.org (Postfix) with ESMTP id 3BB7537B416 for ; Sun, 2 Dec 2001 16:01:30 -0800 (PST) Received: from pantherdragon.org (unknown [4.61.200.192]) by spork.pantherdragon.org (Postfix) with ESMTP id 4FF6B471E6; Sun, 2 Dec 2001 16:01:29 -0800 (PST) Message-ID: <3C0AC0D9.BFD0604B@pantherdragon.org> Date: Sun, 02 Dec 2001 16:01:29 -0800 From: Darren Pilgrim X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: chk no Cc: freebsd-questions@freebsd.org Subject: Re: Changing $IFS in a bash shell References: <200112022343.fB2Nh6k27466@c1742628-a.vncvr1.wa.home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 chk no wrote: > Changing IFS is usually not the best way to do things. Changing IFS > can break other scripts, other parts of your script, & is generally > only used as a last resort. How else do you recommend I alter the criteria bash uses for its word-splitting routine? Redefining IFS in a script isn't a problem at all. The value will only last for duration of the script, inside that script only. > Instead, try things like: > > eval ... |sed "{ I'm doing it with a for-in-do loop to avoid having to use external programs. This is going to be part of a web-front end for a file archive, and the fewer external programs the scripts have to call the better. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message