next up previous contents index
Next: 1.3.2 Piping () Up: 1.3 The UNIX Environment: Previous: 1.3 The UNIX Environment:   Contents   Index

1.3.1 Redirection

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.


next up previous contents index
Next: 1.3.2 Piping () Up: 1.3 The UNIX Environment: Previous: 1.3 The UNIX Environment:   Contents   Index
Paul Wessel 2010-01-14