Dear All,
I have to extract a a few lines from a log file and I know the starting String and end string(WHich is same ). Is there any simplere way using
sed - awk.
e.g. from the following file
--------------------------------------
Some text
Date: 21 Oct 2008
Text to be extracted
Somemore text to be extracted
Date: 21 Oct 2008
Some more text
so I would like to extract the following lines
-------------
Text to be extracted
Somemore text to be extracted
---------------
I know the string "Date: 21 Oct 2008"
One way I can think of is do a grep -n "Date: 21 Oct 2008" filename and then user head and tail.
But I wanted to know is there any simplere way?
Regards,
Rahul