shell - How to make tail display only the lines that have a specific text? -
how make tail display lines have specific text? if search criteria can regular expression, better. need like: tail -f mylogfile.log showonlylineswith "error: "
i running darwin (mac os x) , i'm totally beginner in bash.
-- lot in advace
you can do
tail -f mylogfile.log | grep "error: "
this works regular expressions too. in general, can take output of command, add |
"pipe" grep, , let grep filter out lines don't match pattern.
Comments
Post a Comment