Non-expanding here-documents inside command substitution are subject to newline joining

2017-02-10 Thread Michael Homer
Bash has an unusual behaviour when a non-expanding here-document (<<‘EOT’) is used inside $(…) command substitution. Newline joining occurs within the document when it would not if the same document were not inside a command substitution, while other shells do not perform it in either case. Thi

Re: Segmentation fault when nesting several thousand heredocs

2017-02-10 Thread Chet Ramey
On 2/10/17 12:15 AM, Tom wrote: > Bash Version: 4.4 > Patch Level: 11 > Release Status: release > > Description: > A segmentation fault occurs when nesting several thousand heredocs, as in > the example in the Repeat-By section. I have tested this on several > different distros, OSes

Segmentation fault when nesting several thousand heredocs

2017-02-10 Thread Tom
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/local