[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nested exec<<HERE ambiguity
From: |
Chet Ramey |
Subject: |
Re: nested exec<<HERE ambiguity |
Date: |
Wed, 29 Nov 2000 13:57:44 -0500 |
> Bash Version: 2.02
> Patch Level: 0
> Release Status: release
>
> Description:
> When bash sources (`.') the file whose contents is given after the
> "Repeat-By:" line, it doesn't echo a `1' like the bourne and korn
> shells do. I'm not sure which output is correct. If the file is
> used as a shell script, there's no visible difference.
>
> Repeat-By:
> exec<<a
> exec<<b
> echo 2
> b
> echo 1
> a
> echo 0
My current development version of bash and ksh93 both echo
0
2
and exit. Bash will echo some extra stuff because readline really
wants to echo the input it reads. I'm surprised that `1' would be
echoed at all, since the second here document essentially overwrites
the first.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/