Hi, I am wondering how you guys would solve this with awk.
I have a messages file.
Everyday I have a line
"Jun 22 21:04:49 root: [ID 702911 daemon.notice] Sun StorEdge(TM) Enterprise Backup savegroup: UNIX Daily"
The date would be needed to be dynamicly though.
ie , DATE=`date '+%b %e'`
The problem is, this message file is over 180.000 lines big/long.
I would like to extract a very small part, which starts with the above line(except the date would be today's date)
And 30-50 lines after it.
Anyone know a nifty way to do it instead of creating several tmp files.
Any help is appreciated.
Thanks
I have a messages file.
Everyday I have a line
"Jun 22 21:04:49 root: [ID 702911 daemon.notice] Sun StorEdge(TM) Enterprise Backup savegroup: UNIX Daily"
The date would be needed to be dynamicly though.
ie , DATE=`date '+%b %e'`
The problem is, this message file is over 180.000 lines big/long.
I would like to extract a very small part, which starts with the above line(except the date would be today's date)
And 30-50 lines after it.
Anyone know a nifty way to do it instead of creating several tmp files.
Any help is appreciated.
Thanks