Created
March 27, 2021 01:20
-
-
Save raspi/d7db0967608623444a6e6cfa49a25775 to your computer and use it in GitHub Desktop.
Censor MAC address, IPv4 address from some output
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
# mac: | |
echo "..." | perl -pe 's@[\da-f:]{17}@xx:xx:xx:xx:xx:xx@ig' | |
# IPv4 | |
echo "..." | perl -pe 's@[\d\.]{7,15}@X.X.X.X@ig' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment