I would like to monitor the output of a command and save parts of its output as it prints using a filter. Using grep
would be a way to filter the output but I can only get it to show the matches, but it's not what I want.
In my case I am running curl
on a list of URLs and would like to see its results, while only saving the results that has a status code of 000 or 200 to a text file.