note
jesuashok
<code>
perl -i.bak -nle 's/search/replace/g unless $. & 2; print' file(s)
</code>
The above will apply the changes in line numbers 1,3,5,7,......
<code>
perl -i.bak -nle 's/search/replace/g unless $. & 1; print' file(s)
</code>
The above will apply the changes in line numbers 2,4,6,8,......
<br>
<br>
NOTE: Based on the idea from [id://623136] by [GrandFather]
623134
623136