I would like to redirect output to a file how described in this StackOverflow question but with an exception: let's suppose I do not want to store all the lines which start with the character r
.
Specifically, I execute:
./command | tee /tmp/output.txt
and I get all the printed lines in the file. How to modify the instruction to allow exception?