Tail -v a file while excluding a list of words

greptail

I'd like to tail a log file that's continuously being written to but would like to exclude various entries that are 'common' so I only see errors, etc. as they are thrown. I can pipe to grep -v "pattern" but would ideally like to use a file containing entries to skip. Any ideas?

Best Answer

You can use grep -v "pattern" like you said. But instead of pattern use

`cat file_with_entires_to_skip`

Remember to include the backtics. So your command would look like:

tail -v FILE | grep -v "`cat FILE_WITH_ENTRIES_TO_SKIP`"
Related Question