Can anyone guide me with the BSCH scripting
Hi,
I am new to BASH script. I am working on the script to parsing the log message . the followings are my task:
1. Read the multiple log files, such as N1-2009-10-01, N2-2009-10-2, N3-2010-01-02....
2. Parse the specific message, such as "aaaa"
3. If found the "aaaa" message in the log file and export to excel file
PS. i use zgrep:
zgrep -a --text "aaaa" * > /home/TTS/myfile
and inside file looks like:
N3.2009-11-26-03-05-02.console.log.tar.gz:2009-11-25 20:12:57,429 - aaaa
N4.2009-11-29-00-25-03.console.log.tar.gz:2009-11-28 10:42:18,209 - aaaa
N6.2009-12-01-10-05-02.console.log.tar.gz:2009-12-01 10:00:24,902 - aaaa
How can i use the script export these information into excel file into three columns, like
N3 2009-11-25 20:12:57 aaaa
N4 2009-11-28 10:42:18 aaaa
N6 2009-12-01 10:00:24 aaaa
Thanks
|