Created
September 19, 2019 02:12
-
-
Save porcupinenick/f81422778b99638e836a9b940607c615 to your computer and use it in GitHub Desktop.
Calculating shasums in bash via user input
This file contains hidden or 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
#!/bin/bash | |
#Ask the user for a sample string | |
echo Hello, what do you want me to hash? | |
read text | |
echo | |
echo | |
echo 'the hash is: ' | |
echo -n $text | shasum -a 512 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment