frhling has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/bash NAME=evaluation_`date +%Y%m%d` find /dir -name "*.log" -mtime 0 -exec cat "{}" \; >> $NAME.log grep -e word1 -e word2 $NAME.log | grep -v word3| awk '{n=split($11,P, +"/");print $1 " " $2 ";" $3 ";" $9 ";" $11 ";" P[n]}' > $NAME.csv sed -i '1iDate;Time;From;To;User' $NAME.csv rm $NAME.log echo "done."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: *log to *.xls
by marto (Cardinal) on Dec 19, 2012 at 09:32 UTC | |
|
Re: *log to *.xls
by 2teez (Vicar) on Dec 19, 2012 at 10:00 UTC | |
by Tux (Canon) on Dec 19, 2012 at 19:52 UTC | |
by frhling (Initiate) on Dec 20, 2012 at 12:34 UTC | |
|
Re: *log to *.xls
by tobyink (Canon) on Dec 19, 2012 at 12:33 UTC | |
by karlgoethebier (Abbot) on Dec 19, 2012 at 18:41 UTC |