Subject: Re: bin/26207: ksh does not treat spaces in EOF here-document markers properly.
To: None <christos@zoulas.com>
From: James Chacon <jmc@netbsd.org>
List: netbsd-bugs
Date: 07/19/2004 16:00:39
On Thu, Jul 08, 2004 at 11:41:52AM -0400, christos@zoulas.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
> >Closed-Date:
> >Last-Modified:
> >Originator: Christos Zoulas
> >Release: NetBSD 2.0G
> >Organization:
> She Sells Sea Shells.
> >Environment:
> System: NetBSD gw2.twosigma.com 2.0G NetBSD 2.0G (TWOSIGMA) #182: Wed Jul 7 18:12:55 EDT 2004 christos@gw2.twosigma.com:/usr/src/sys/arch/i386/compile/TWOSIGMA i386
> Architecture: i386
> Machine: i386
> >Description:
> A trailing space after the EOF marker of a here document causes
> ksh not to match it.
>
> >How-To-Repeat:
>
> #!/bin/ksh
>
> cat << EOF
> hello
> 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.
James
>
> >Fix:
> unknown
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
>
>