I'm trying to assign sha512sum of a tar.gz file to a variable in shell in ubuntu 14.
I tried sha512sum mentioned here https://manpages.ubuntu.com/manpages/xenial/man1/sha512sum.1.html
But it's printing both 512sum and also the file_name.
But I'm only looking for the sum in this case. Are there any flags that I can pass? I didn't find any such in the manpage for sha512sum.
Pipe it to cut and use the first field.
Options don't seem to be there.