I have few commands linked through pipes, and at the end is a conditional awk: example below
command1 | command 2 | awk '$1 > 800'
Now sometimes it will output few lines, and sometimes no lines. I want a condition that will prove true only if there's some output (1 or more lines) Is there a way to make it work?
Like,
if command1 | command 2 | awk '$1 > 800' (some output); then
do command3
else; (blank output)
Do nothing


while readconstruct. The while loop will iterate once for every line of output. Is that what you are looking for?