Difference between revisions of "Main Page/IT/nagios"
From Lewis Consultancy Wiki
Jump to navigationJump to search (Created page with "=A one liner to split up a nagios log= <pre>cat nagios.log | while read line; do unixts=`echo $line | cut -b 2-11`; logname="nagios-`date -d \@$unixts +%m-%d-%Y`-00.log"; e...") |
(No difference)
|
Latest revision as of 10:44, 25 May 2016
A one liner to split up a nagios log
cat nagios.log | while read line; do unixts=`echo $line | cut -b 2-11`; logname="nagios-`date -d \@$unixts +%m-%d-%Y`-00.log"; echo $line >> $logname; done