Question: 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?

Answer: 
As others have already pointed out the difference between `>` (overwrite) and `>>` (append) redirection operators, i am going to give couple of solutions.

1. You can use the command grouping `{}` feature of `bash` to send the output of all the commands in a single file :

```
{ sha1sum foo.txt ;sha512sum foo.txt ;md5sum foo.txt ;} >checksum.txt

```
2. Alternately you can run the commands in a subshell `()` :

```
( sha1sum foo.txt ;sha512sum foo.txt ;md5sum foo.txt ) >checksum.txt

```
You need to use the append redirector `>>` instead of `>` for the subsequent commands e.g.

```
sha1sum zeromq-4.1.2.tar.gz > sha.txt
md5sum zeromq-4.1.2.tar.gz  >> sha.txt 
sha512sum zeromq-4.1.2.tar.gz >> sha.txt 

```

See the `Appending Redirected Output` section of the bash manual page (`man bash`).