perl -i.orig -pe 'if ($c) { s/^line(\d+)/name$1/ } $c = /^\$\$\$\$$/; +' input.txt [download]
In reply to Re: $/ find a line by borisz in thread $/ find a line by Anonymous Monk