8

How to delete lines where the given part of the line is more then 100 chars?

view full story
linux-howto

http://unix.stackexchange.com – I know I can delete lines that are longer than 100 chars with this: sed '/^.\{100\}..*/d' But I have the following example line: <a href="http://xxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY</a><br> So I need to only delete the lines where "YYY": ">Y...Y...Y</a><br> is longer than 100 chars. How can I do this? (HowTos)