Hide Forgot
Description of problem: Whitespace is significant in a "here" document marker. For example: cat >> test.txt << HERE foo barr baz HERE would work perfectly if HERE has no whitespace at the end, but cat >> test.txt << HERE foo barr baz HERE with the last string being actually "HERE " would fail hard for nonobvious reasons. --> Bash should trim the line before comparing it to the here "here" tag. Version-Release number of selected component (if applicable): bash-3.2-24.el5 How reproducible: Always
(In reply to comment #0) > Description of problem: > > Whitespace is significant in a "here" document marker. > > For example: > > cat >> test.txt << HERE > foo barr baz > HERE > > would work perfectly if HERE has no whitespace at the end, but > > cat >> test.txt << HERE > foo barr baz > HERE > > with the last string being actually "HERE " would fail hard for nonobvious > reasons. > > --> Bash should trim the line before comparing it to the here "here" tag. Should not! See posix: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_07_04 > > Version-Release number of selected component (if applicable): > > bash-3.2-24.el5 > > How reproducible: > > Always