Keywords: GMT_Tutorial

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

The exclamation sign (!) allows us to overwrite existing files. The use of it the exclamtion sign is only required when you set the shell variable noclobber.

Next: 1.3.2 Piping () Up: 1.3 The UNIX Environment: Previous: 1.3 The UNIX Environment: Contents Index