Skip to content

Instantly share code, notes, and snippets.

@phackwer
Last active October 11, 2016 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phackwer/b70e47331606e6e2313749b04862d0e8 to your computer and use it in GitHub Desktop.
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
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