NetBSD Problem Report #809
From gnats Mon Feb 20 10:33:43 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id KAA01156 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 20 Feb 1995 10:33:42 -0800
Message-Id: <199502201327.NAA03766@gluon.city.ac.uk>
Date: Mon, 20 Feb 1995 13:27:55 GMT
From: sh391@city.ac.uk
Reply-To: sh391@city.ac.uk
To: gnats-bugs@NetBSD.ORG
Subject: If you alter $IFS in sh it breaks
X-Send-Pr-Version: 3.2
>Number: 809
>Category: bin
>Synopsis: If you alter $IFS in sh it breaks
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 20 10:35:01 +0000 1995
>Closed-Date: Sat Feb 10 18:47:22 +0000 1996
>Last-Modified: Sat Feb 10 18:48:11 +0000 1996
>Originator: David Brownlee
>Release: Feb-95
>Organization:
Private
>Environment:
sparc, 1.0A, current
System: NetBSD gluon.city.ac.uk 1.0A NetBSD 1.0A (GLUON) #1: Thu Feb 9 11:25:40 GMT 1995 monoadm@gluon.city.ac.uk:/mono/u1/NetBSD/src/sys/arch/sparc/compile/GLUON sparc
>Description:
If you add : to the start of IFS then shell no longer treats multiple
blanks correctly - it splits out empty arguments between each blank.
>How-To-Repeat:
Run the following script - & watch the blank line between a & b on the
'changed IFS' run.
#!/bin/sh
list="a b c "
echo "With ordinary IFS"
for i in $list;do
echo $i
done
IFS=":${IFS}"
echo "With changed IFS"
for i in $list;do
echo $i
done
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: christos
State-Changed-When: Sat Feb 10 13:47:22 EST 1996
State-Changed-Why:
fixed a long time ago
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.