🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #353

Re: Bash 1.01 IFS doesn't seem to...

#353
From: Chet Ramey
Date: Wed, 19 Jul 1989 18:00
29 lines
1472 bytes
Bennett Todd writes:

?bent[1] IFS=:
?bent[2] while read login passwd uid gid gcos home shell;do
?> echo -n $gcos
?> done </etc/passwd

?Hmmm -- not only did it not print out anything (i.e. IFS didn't work,
?which was my complaint) 

This is a simple typo (or an incomplete change).  In builtins.c:read_builtin,
the list_string call should read

        words = list_string (input_string, ifs_chars, 0);

For some reason, " \t\n" was hard-coded in there, though the value of $IFS
is assigned to ifs_chars.

?the child invocation of Bash within the script
?exited when EOF was hit on the loop's redirected input, instead of
?switching back to interactive.

I couldn't reproduce this under SunOS 3.5, bash 1.02, gcc-1.35.

Chet Ramey
Chet Ramey			"We are preparing to think about contemplating 
Network Services Group, CWRU	 preliminary work on plans to develop a
chet@cwjcc.INS.CWRU.Edu		 schedule for producing the 10th Edition of 
				 the Unix Programmers Manual." -- Andrew Hume
Technical Details
Message-ID: <430@cwjcc.CWRU.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!kiwi!chet
References: <8907171938.AA08298@orion>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!kiwi!chet
From: chet@kiwi.CWRU.EDU (Chet Ramey)
Newsgroups: gnu.bash.bug
Subject: Re: Bash 1.01 IFS doesn't seem to...
Summary: FIX
Message-ID: <430@cwjcc.CWRU.Edu>
Date: 19 Jul 89 18:00:13 GMT
References: <8907171938.AA08298@orion>
Sender: news@cwjcc.CWRU.Edu
Reply-To: chet@kiwi.INS.CWRU.Edu (Chet Ramey)
Distribution: gnu
Organization: CWRU Andrew R. Jennings Computing Center
Lines: 29