If you wish to add output from a command to a file rather than replace it, double the right angled bracket to >>:
$ printf 'First command\n' > file $ printf 'Second command\n' >> file $ cat file First command Second command
The file doesn't need to exist already for this to work; the >> operator will create it for you, just like the > operator will.
This is a useful syntax for appending to log files, describing the output of your script as you go:
#!/bin/bash printf 'Starting script\n' >> log printf 'Creating test directory\n' >> log mkdir test || exit printf 'Changing into test directory\n' >> log cd test || exit printf 'Writing current date\n' >> log date > date || exit