Just for my records
grep "WORD\|ANOTHER\|NEITHER" string
searches for either “WORD” or “ANOTHER” or “NEITHER” in string.
Just for my records
grep "WORD\|ANOTHER\|NEITHER" string
searches for either “WORD” or “ANOTHER” or “NEITHER” in string.
If you want to search for a pattern at the end of a line, you can use
tail -f logfile | grep -v "0$"
breaking down the commands
tail -f : standard tail command. Continuous output to console as the file grows (or until it ends)
grep -v : -v command forces grep to show content that doesn’t match pattern
0$ : This regex is specifically looking for a 0 at the end of the line, which is denoted by $.