Skip to content

Instantly share code, notes, and snippets.

@porcupinenick
Created September 19, 2019 02:12
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 porcupinenick/f81422778b99638e836a9b940607c615 to your computer and use it in GitHub Desktop.
Save porcupinenick/f81422778b99638e836a9b940607c615 to your computer and use it in GitHub Desktop.
Calculating shasums in bash via user input
#!/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