A oneliner?
# windows double quotes perl -lne "$mark++ if /MyWantedTextMark/; print if $mark" a.txt > b.t +xt # Linux quotes perl -lne '$mark++ if /MyWantedTextMark/; print if $mark' a.txt > b.t +xt
See perlrun where perl switch are described
L*
In reply to Re: Fastest way of changing the beginning of a txt file.. -- oneliner
by Discipulus
in thread Fastest way of changing the beginning of a txt file..
by pedrete
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |