Re: here-documents in $(command) substitution

2016-11-28 Thread Chet Ramey
On 11/27/16 9:51 AM, Eduardo Bustamante wrote: > Delimiter (in your case the three character string "EOF"), has to be > on its own line, with no leading or trailing blanks (or any other > characters). If bash 3.x used to behave different, it's because it was > buggy. Not exactly. Bash has always

Re: here-documents in $(command) substitution

2016-11-28 Thread Chet Ramey
On 11/27/16 2:12 AM, Alexey Tourbin wrote: > Bash Version: 4.4 > Patch Level: 0 > Release Status: release > > Description: > Handling of here-documents in command substitution seems to be inconsistent. > > $ cat test.sh > export foo=$(cat < echo bar > EO

Re: here-documents in $(command) substitution

2016-11-27 Thread Reuti
Am 27.11.2016 um 18:51 schrieb Eduardo Bustamante: > Hi Alexey, > > Please read the specification of here-documents in the standard: > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04 > > Quoting the relevant parts: > >The here-document shall be treated

Re: here-documents in $(command) substitution

2016-11-27 Thread Eduardo Bustamante
Hi Alexey, Please read the specification of here-documents in the standard: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04 Quoting the relevant parts: The here-document shall be treated as a single word that begins after the next and continues until th

here-documents in $(command) substitution

2016-11-27 Thread Alexey Tourbin
GNU/Linux Machine Type: x86_64-alt-linux-gnu Bash Version: 4.4 Patch Level: 0 Release Status: release Description: Handling of here-documents in command substitution seems to be inconsistent. $ cat test.sh export foo=$(cat <