in reply to Fastest way of changing the beginning of a txt file..
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*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fastest way of changing the beginning of a txt file.. -- oneliner
by pedrete (Sexton) on Feb 18, 2019 at 11:13 UTC | |
by BrowserUk (Patriarch) on Feb 18, 2019 at 12:28 UTC | |
by Discipulus (Canon) on Feb 18, 2019 at 11:17 UTC |