I want to redirect the filtered output of a tail -f, as follows:
tail -f myfile | egrep '(searchterm_a)|(searchterm_b)' >> outputfile.txt
But for some reason the redirection is not working as I would have expected it to. Instead, an empty file is created.
Does anyone have an idea of where I have made an error?