Last active
February 25, 2016 20:49
-
-
Save gerep/d089d26c84dec3100c47 to your computer and use it in GitHub Desktop.
This sed command will search for the tab <KEY>. count 12 characters and replace them with *. The same happens with the tag <KEYVAL>
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
sed -e 's/<KEY>[0-9]\{12\}/(&)/g' -e 's/(<KEY>.*)/<KEY>*************/g' -i blah.log | |
sed -e 's/<KEYVAL>[0-9]\{12\}/(&)/g' -e 's/(<KEYVAL>.*)/<KEYVAL>*************/g' -i blah.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment