Last active
March 29, 2018 01:19
-
-
Save deviousway/810e2ba5515848fca67d3817658f124f to your computer and use it in GitHub Desktop.
Sed replace line what contain
This file contains hidden or 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
sed -i 's/domain1\.com/domain2\.com/d' | |
sed -i '/<?php/c\<?php' | |
#Add line (/n) after line what contain pattern | |
grep -rl 'pattern' public_html/ |xargs sed -i "s/1; ?>/1; ?>\n/g" | |
#remove line what contain | |
grep -rl 'pattern' public_html/ |xargs sed -i '/pattern/d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment