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 supported the Bourne shell extension of allowing the command substitution terminator to delimit a here document. > Hence, the proper way to do a here-document inside command substitution: > > hp% cat hd > export foo=$(cat <<EOF > echo bar > EOF > ) This is true and obeys the letter of the standard. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/