Ahh.. who gave the code-monkey a wrench?
perl -pe 'if($on == 1) { if(m/c>80/) {s/80/100/}; $on=0 }; $on=1 if m/findme/;' test.txt
<a> <b>findme</b> <c>80</c> </a> <a> <b>ignoreme</b> <c>80</c> </a>
No comments:
Post a Comment