Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15572 > unrolled thread

Re: Incomplete command substitution in here-document not regarded as an error

Started byChet Ramey <chet.ramey@case.edu>
First post2019-11-07 15:06 -0500
Last post2019-11-07 15:06 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Incomplete command substitution in here-document not regarded as an error Chet Ramey <chet.ramey@case.edu> - 2019-11-07 15:06 -0500

#15572 — Re: Incomplete command substitution in here-document not regarded as an error

FromChet Ramey <chet.ramey@case.edu>
Date2019-11-07 15:06 -0500
SubjectRe: Incomplete command substitution in here-document not regarded as an error
Message-ID<mailman.846.1573157206.13325.bug-bash@gnu.org>
On 11/6/19 4:37 PM, Oğuz wrote:
> cat <<EOF
> $(seq 10
> EOF
> 
> prints 1, while it should report a syntax error.

Thanks for the report. Bash has, for some years, allowed EOF/EOS to 
terminate a command substitution in certain circumstances, but this really
only shows up when you're expanding it inside a here-document. There is a
(relatively cryptic) warning message, but that only shows up in development
builds. It seems reasonable to make the behavior when expanding here-
documents match the behavior outside them.

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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web