Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • If both platforms have openssl installed, you can just use openssl sha256 in both places and not worry about picking an os-specific program. Commented Aug 13, 2015 at 2:27
  • I realized after writing this question, this question may be better suited for stack overflow. Should I move it? Commented Aug 13, 2015 at 2:29
  • openssl sha256 looks good for generating the hash. Is there a related way to check a file with the hashes listed in it. I.e. equivalent to sha256 -c FILE? Commented Aug 13, 2015 at 2:34
  • I don't believe openssl provides such an option. Commented Aug 13, 2015 at 2:43
  • for $OPT in ... won't work, remove $. And it's superfluous to use $? just for checking success/failure, simply write if command -v "$OPT"; then. Commented Aug 13, 2015 at 2:48