GOOGLE Search

Google
 

Thursday, December 13, 2007

Linux Tip No. 2: Combining Tail and Awk

- 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

No comments: