I was trying to check the authenticity of a download by using the shasum in ubuntu. I am unable to understand the syntax though.
The code below works
echo "<sha-hash> *filename" | shasum -a 256 -c
I wanted to know why are we putting a "*"(asterisk) before the file name.
I also tried generating a file using
shasum -a 256 filename > file.sha
shasum -a 256 -c file.sha
The above code also works. When I opened the file.sha
file, I saw
<hash> <filename>
There is no asterisk present in the file. I tried writing the first statement without asterisk, but then it throws an error stating
shasum: standard input: no properly formatted SHA1 checksum lines found