Hi,
New to shell scripting....
I have log file content as below:
Quote:
/logs/S1/logfilename1.log.gz:01/20/2010 14:43:57 ERROR [128500] Exception is caught.
/logs/T15/logfilename2.log.gz:01/20/2010 14:43:57 ERROR [83D9H7] Exception is caught.
I have to count the number of occurences of ERROR or INFO Messages.
So, I cut 5 th column and uniquly sorted and redirected it to new.txt file.
But I want copy to S*/Filename and T*/Filename of respective ERROR or INFO messages,uniquly sorted to new.txt file.
I tried awk command ..but it failed to copy to new.txt file.
Once this is done I have to check for the occurences of ERROR string. So for that I searched for egrep and tried to use, but output is incorrect.
Final output i am looking for:
Quote:
S*/Filename,Exception is caught., 20
T*/Filename,Exception is caught. ,30
Do anybody have any idea???
Thanks in advance..