Is there any bash command that will let you get the nth line of STDOUT?
That is to say, something that would take this
$ ls -l -rw-r--r--@ 1 root wh
Hmm
sed did not work in my case. I propose:
for "odd" lines 1,3,5,7... ls |awk '0 == (NR+1) % 2' for "even" lines 2,4,6,8 ls |awk '0 == (NR) % 2'
for "odd" lines 1,3,5,7... ls |awk '0 == (NR+1) % 2'
for "even" lines 2,4,6,8 ls |awk '0 == (NR) % 2'