I'm afraid what prompted me to file the report was something more
subtle. Upon trying my test one-liner on a second virtual terminal, the
one-liner worked, so I'm now trying to figure out what settings might
affect the behavior. My test one-liner is:
printf "aa bb\n cc\n" | readarray ; echo ${MAPFILE[0]}
On 2018-03-16 14:59, Greg Wooledge wrote:
> > wooledg:~$ set +m
> > wooledg:~$ echo hello world | readarray; declare -p MAPFILE
> > declare -a MAPFILE=([0]=$'hello world\n')
> >
> > lastpipe will typically work in a script, because job control (set +m)
> > is disabled in scripts by default. The reverse is true in an interactive
> > shell.
So that's it, then? On the command line, readarray only works with >
"shopt -s lastpipe ; set +m", neither of which is set by default?