Most GMT programs read their input from the terminal (called stdin) or from files, and write their output to the terminal (called stdout). To use files instead one can use UNIX redirection:
GMTprogram input-file >! output-file GMTprogram < input-file >! output-file GMTprogram input-file >> output-file # Append to existing file
The exclamation sign (!) allows us to overwrite existing files.