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
In this example, and in all those to follow, it is assumed that you do not have the shell variable noclobber set. If you do, it prevents accidental overwriting of existing files. That may be a noble cause, but it is extremely annoying. So please, unset noclobber.