[gnu.bash.bug] read builting bash/sh mismatch

hhe@IFI.UIO.NO (01/15/90)

	There seems to be a mismatch between the bash 1.04 and Sun/Ultrix
	sh read builtin. When assigning leftover words to the last vari-
	able, bash converts multiple whitespace chars to a single space
	while at least Sun and Ultrix sh doesn't (the sh manpage doesn't
	say anything about what it does with whitespace. Sh strips of
	trailing whitespace.)

bash$ echo $BASH_VERSION
1.04.8
bash$ cat ./mismatch
IFS=' 	
' # IFS=space tab newline, the foo   bar line has got trailing whitespace
read testing << _END_
foo   bar   	    
_END_
echo ":$testing:"
bash$ bash ./mismatch
:foo bar:
bash$ sh ./mismatch
:foo   bar:
bash$

	Bash calls list_string(input_line, ifs_chars, ..) to separate
	the words on the input line (and remove whitespace) before
	assigning them to variables, while sh apparently parses the
	input line unmodified.

					Hans Henrik Eriksen (hhe@ifi.uio.no)
					University of Oslo