Re: reading lines from standard input or a two way pipe into an array



hyperboogie <hyperboogie@xxxxxxxxx> wrote:
I'm trying to read the output of 'ls -lartF' into an array, a line
into each array element


O=$IFS IFS=$'\n';array=( $(IFS=$O;ls -lartF) );IFS=$O;printf "%s\n" "${array[@]}"

--
pgas @ SDF Public Access UNIX System - http://sdf.lonestar.org
.