awk is the tool to use. you can select search terms, and format the output. example: the log file is x number of columns wide. you select which columns to print by specifying $1, $2, $3, etc, to indicate which columns to show.
feed the output of cat /var/log/syslog to awk via pipe.
cat /var/log/syslog | awk ' {antip2p print $3, $2, $4, $1, $5, $9, $7, $8, $6}' , or something along those lines. As you can see, the order of the columns to print can be specified to your liking.
PS: I probably have a syntax error in the awk statement, but can't see it right off hand.
Last edited by bigrigdriver; 12-19-2004 at 12:03 PM.
|