Microsoft
Software
Hardware
Network
Question : to grep log files
Hi, I am using egrep to grep for a particlular date in a log file. However I am getting only first line.
Example in the log below, When I egrep for Nov 12, 2008 I am getting only the first line, but I require all the lines following that. Is there any way by which we can do that.
er.html" not found from requested resource "/m
otoconfig/gomez.jsp".>
Size of Env:36
ModeId:1
Host:172.20.79.109
Domain:mphasis
ModeId:1
Host:FL08-4492
Domain:comm.mot.com
ModeId:1
Host:mlbp-0090
Domain:mphasis
ModeId:1
Host:mlbp-0101
Domain:mphasis
ModeId:1
Host:172.20.79.74
Domain:mphasis
ModeId:1
Host:MLBP-0097
Domain:MPHASIS.COM
ModeId:1
Host:mjie-0003
Domain:mphasis
ModeId:1
Host:plsu014
Answer : to grep log files
Assuming a fixed number of lines (and Solaris 10), you can do
/usr/sfw/bin/ggrep -A 20 "Nov 12, 2008 |11/12" motoconfig1.out
Random Solutions
Identify a computer using IP address
Creating a bash script which accepts parameters
Need bash script to copy/update all files recursively under a certain size
Reply messages with small fonts
How to connect home speakers to a pc?
Outlook - slow receipt of email
Forward a copy of Email from Outlook 2003 to another email address
mta and information store services won't start on front end server
Stored Procedure - DTS call
Batch file or script to delete files or folders older than 30 days.