- you can use this command to provide a nice output of logs.
Command:
>tail -f logs.log | grep -e "word" | awk '{ print $12 "\t" $13' }'
"word" - any line containing "word" will be captured
$12 - column 12
"\t" - space
GOOGLE Search
Thursday, December 13, 2007
Linux Tip No. 2: Combining Tail and Awk
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment