> On Jul 13, 2021, at 4:37 PM, Paul Gilmartin <paulgboul...@aim.com> wrote: > > Description: > When "word" in here-document contains command substitution, > bash reports an error: > here: line 4: warning: here-document at line 2 delimited by end-of-file > (wanted `foo$( true )bar') > Man bash shows: > Here Strings > A variant of here documents, the format is: > > [n]<<<word > > The word undergoes tilde expansion, parameter and variable expansion, > command substitu‐ > tion, arithmetic expansion, and quote removal.
Here-strings are not here-documents, so you've been reading the wrong section of the man page. The section on here-documents makes it clear that the behavior you've observed is not a bug. Here Documents [...] The format of here-documents is: [n]<<[-]word here-document delimiter No parameter and variable expansion, command substitution, arithmetic expansion, or pathname expansion is performed on 'word'. -- vq