I'm using the following command
tail -f /mydir/myfile | grep "searchterm" >> outfile
Without the -f
it works fine, but with the -f
, which I need, nothing is written to the file. The following outputs to the console just fine
tail -f /mydir/myfile | grep "searchterm"
What do I need to do in order to get my command to correctly write out to a file?