Quote:
Originally Posted by Apostol
Because first I need to find line from which I want to extract information.
|
This is not a reason to run two
greps instead of only one. It will run faster, needs less resources and as you can see makes less difficulties too.
Most probably you can combine the two patters like:
Code:
grep -Po '(?<=title>)(.*)(?=<)'
or something similar.
A final comment: parsing a html in shell is not an easy job, probably a real html/xml parser would be better.