I try to Check the latest Firefox and want to get all hashes in one TXT file.
What I try to do is:
sha1sum firefox.tar.gz > sha.txt
and I try also:
md5sum firefox.tar.gz > sha.txt | sha1sum firefox.tar.gz > sha.txt | sha512sum firefox.tar.gz > sha.txt
but only the last in this case the sha512 is printed to the sha.txt.
What am I doing wrong? Please can someone out there help me with this?
Best Answer
As others have already pointed out the difference between
>
(overwrite) and>>
(append) redirection operators, i am going to give couple of solutions.You can use the command grouping
{}
feature ofbash
to send the output of all the commands in a single file :Alternately you can run the commands in a subshell
()
: