Created
January 9, 2018 23:10
-
-
Save dylan-chong/14a4d88aafb85794ca39f04bda8df708 to your computer and use it in GitHub Desktop.
Perl find and replace across multiple lines
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
# File | |
echo 'A' > test-file | |
echo 'B' >> test-file | |
perl -i -0 -pe 's/A\nB/REPLACEMENT/g' test-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment