for just the third line
perl -pi -e "$.== 3 and s/searchpattern/replacepattern/" filename
In reply to Re: Doing a find/replace on the nth line
by BrowserUk
in thread Doing a find/replace on the nth line
by jdev20
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |