Hi,
Can any one tell me how to copy an alertlog file from a particular time stamp using shell script?
Thanks
Hi,
Can any one tell me how to copy an alertlog file from a particular time stamp using shell script?
Thanks
that's by copy command ( cp ) only, can you please be more specific in your questions if possible with some mock examples?
Also, please post what you have tried so far.
Hi
Actually, i need to copy an alert log file from a particular time stamp.
its like
Ex:
alertlog file
------------
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
Mon Dec 15 04:30:15 2008
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
Tue Dec 16 05:40:25 2008
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
-----------------------------------------------
then i want to copy the file from timestamp "Tue Dec 16 05:40:25 2008" into a new file.
i hav tried like this
====================================
is there any mistake in this?
something like this
awk '{ if ( $0 ~ /Tue Dec/ ) { ok=1 } if ( ok ) { print } }' filename
to print lines starting from a patten match to till the end of the file.
Please correct me if I have misunderstood the problem.