That will apply the search/replace on every 3rd line.perl -pi -e "s/searchpattern/replacepattern/ if $. % 3 == 0" filename
Cheers - L~R
In reply to Re: Doing a find/replace on the nth line
by Limbic~Region
in thread Doing a find/replace on the nth line
by jdev20
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |