On Nov 17 09:01:18, alexan...@beard.se wrote: > > > On November 17, 2020 5:04:19 AM GMT+01:00, Jordan Geoghegan > <jor...@geoghegan.ca> wrote: > >Hello, > > > >I'm not sure if this is a bug, or if it's just a pdksh thing, but I > >stumbled upon some interesting behaviour when I was tinkering around > >with quoting and using a poor mans array: > > > >test=$(cat <<'__EOT' > ># I'll choose not to close this quote > >other_stuff > >__EOT > >) > > > >echo "$test" > > > > > >When I run this command on ash, dash, yash, bash, zsh or ksh93 I get > >the > >following output: > > > ># I'll choose not to close this quote > >other_stuff > > > >But when I run it on ksh from base or any pdksh derivative it throws an > > > >error about an unclosed quote: > > > >test.sh[8]: no closing quote > > I believe this is a known shortcoming of how ksh determines the scope of the > $(...).
Does that also mean the 8th line in a 7-line script?