[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newlines resulting from alias expansion are ignored by here-document
From: |
Chet Ramey |
Subject: |
Re: Newlines resulting from alias expansion are ignored by here-document processing |
Date: |
Tue, 5 Dec 2023 11:21:38 -0500 |
User-agent: |
Mozilla Thunderbird |
On 11/30/23 3:45 AM, gldrk wrote:
$ cat test
alias 'foo=cat <<EOF
hello'
foo
world
EOF
$ sh test
world
test: line 5: hello: command not found
My reading of the upcoming POSIX revision
(https://www.austingroupbugs.net/view.php?id=953#c4214)
is that they should be treated just like newline tokens coming from the
source.
Thanks for the report. Reading here-documents from aliases is a known
issue. There will be an initial fix in the next devel branch push.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: Newlines resulting from alias expansion are ignored by here-document processing,
Chet Ramey <=