Created
April 21, 2015 19:39
-
-
Save prelegalwonder/33945f14e8de40c0b74d to your computer and use it in GitHub Desktop.
Comment out matched lines in Sed.
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
#!/bin/bash | |
for i in `cat policy-redo.txt | grep "Filename:" | awk '{ print $3 }'` | |
do | |
sed -i '/^\(.*\)#/!'" s|\(^.*$i.*$\)|#\1|" twpol.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment