Last active
October 11, 2016 14:01
-
-
Save phackwer/b70e47331606e6e2313749b04862d0e8 to your computer and use it in GitHub Desktop.
Diversas formas de substituição e geração de MD5 e SHA1 com base em padrões dentro de arquivos
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
for f in `grep -rl srv267 .`; | |
do \ | |
sed -i 's/srv267/pvl010/g' $f && \ | |
echo $f \ | |
set -- $(md5sum $f) && \ | |
echo $1 > $f.md5; | |
set -- $(sha1sum $f) && \ | |
echo $1 > $f.sha1; | |
done; | |
for f in `grep -rl srv269 .`; | |
do \ | |
sed -i 's/srv269/pvl015/g' $f && \ | |
echo $f ; | |
done; | |
for f in `grep -rl b0c9a540-2d54-4665-a88e-67793078525a .`; | |
do \ | |
sed -i 's/b0c9a540-2d54-4665-a88e-67793078525a/5199c27e-2de4-4408-90f3-39bc5be4b6e6/g' $f && \ | |
echo $f ; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment