Created
December 8, 2009 16:29
-
-
Save fixlr/251770 to your computer and use it in GitHub Desktop.
One-liner to add a new line of text after the regex matches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{print};/foo/{print "bar"}' example.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment