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
You can use awk:
ls -l | awk 'NR==2'
The above code will not get what we want because of off-by-one error: the ls -l command's first line is the total line. For that, the following revised code will work:
ls -l | awk 'NR==3'