3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 526
/ 3 Years ago, sat, october 2, 2021, 4:55:04
I have this input file:
text1
match
text2
match
text3
And I have this command:
perl -lpe 'print "prepend_me" if /^match$/' text.txt
And its output is:
text1
prepend_me
match
text2
prepend_me
match
text3
But I want:
text1
prepend_me
match
text2
match
text3
How do I get this?
More From » bash