[bash] How to append output to the end of a text file