Subject: Re: bin/26207: ksh does not treat spaces in EOF here-document markers properly.
To: None <email@example.com>
From: James Chacon <firstname.lastname@example.org>
Date: 07/19/2004 16:00:39
On Thu, Jul 08, 2004 at 11:41:52AM -0400, email@example.com wrote:
> >Number: 26207
> >Category: bin
> >Synopsis: ksh does not treat spaces in EOF here-document markers properly.
> >Confidential: no
> >Severity: serious
> >Priority: low
> >Responsible: bin-bug-people
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Thu Jul 08 16:00:02 UTC 2004
> >Originator: Christos Zoulas
> >Release: NetBSD 2.0G
> She Sells Sea Shells.
> System: NetBSD gw2.twosigma.com 2.0G NetBSD 2.0G (TWOSIGMA) #182: Wed Jul 7 18:12:55 EDT 2004 firstname.lastname@example.org:/usr/src/sys/arch/i386/compile/TWOSIGMA i386
> Architecture: i386
> Machine: i386
> A trailing space after the EOF marker of a here document causes
> ksh not to match it.
> cat << EOF
> [note that there is a trailing space in the last EOF
According to SUSE3 this is expected behavior:
The here-document shall be treated as a single word that begins after the next
<newline> and continues until there is a line containing only the delimiter
and a <newline>, with no <blank>s in between.
Plus, testing across a variety of shells shows this to be the behavior.