I have this code:
list=$(ls -l | awk '{print$3,$6,$7,$8,$9}' | grep -v root)
echo $list
and the output is a joint version of all the filtered strings which looks like:
> avahi Nov 16 21:50 1170 syslog Nov 16 21:50 1171 messagebus ...
and what I wanted looks like:
> avahi Nov 16 21:50 1170
> syslog Nov 16 21:50 1171
> messagebus Nov 16 21:50 1179
> ...
I've also read that the default output of grep should give me the paragraphs version like what I want but this isn't the case. What am I doing wrong?