Advertisement
Guest User

Untitled

a guest
Oct 25th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. bash-4.1$ echo 'one S56G one two three
  2. > four five V67X six' > file.txt
  3.  
  4. bash-4.1$ cp file.txt result.txt
  5.  
  6. bash-4.1$ cat file.txt | grep -o '[A-Z][0-9]\{2\}[A-Z]' | while read i ; do
  7. > sed -i "s/$i/$(echo $i | openssl dgst -sha1)/g" result.txt
  8. > done
  9.  
  10. bash-4.1$ cat result.txt
  11. one (stdin)= 0a60d0eef7e4be51a2f3876758d3e565f2f60b74 one two three
  12. four five (stdin)= a4dac2fba8ece40837e10923c528c5c11299feec six
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement