3 ms·
I believe Bash readarray/mapfile is more like doing this in Zsh: lines=( "${(@f)$(my_command)}" ) or lines=( "${(@f)$(<my_file)}" ) which IMO is a littl
by nerdponx 3y ago
I believe Bash readarray/mapfile is more like doing this in Zsh:
lines=( "${(@f)$(my_command)}" )
or
lines=( "${(@f)$(<my_file)}" )
which IMO is a little less nice than using a builtin with a name like "readarray".
But this is cool too.