Creates a temporary directory in /tmp or (when defined) in the directory specified by the environment variable TMPDIR. The name of the temporary directory is returned as environment variable GMT_TMPDIR. This function also causes GMT to run in ‘isolation mode’, i.e., all temporary files will be created in GMT_TMPDIR and the gmt.conf file will not be adjusted.

Remove all files and directories in which the current process number is part of the file name. If the optional prefix is given then we also delete all files and directories that begins with the given prefix.

Takes a file with a long list of commands and splits them into many chunks that can be executed concurrently. Without arguments the function will display its usage. Note: It is your responsibility to make sure no race conditions occur (i.e., multiple commands writing to the same file).

Returns a lexically ordered filename stem (i.e., no extension) given the file prefix and the current frame number, using a width of 6 for the integer including leading zeros. Useful when creating animations and lexically sorted filenames are required.

Accepts a namestem which gives the prefix of a series of image files with names dir/namestem_*.*. Optional argument sets the directory [same as namestem], and frame rate [24]. Without arguments the function will display its usage.

Accepts a namestem which gives the prefix of a series of image files with names dir/namestem_*.*. Optional argument sets the directory [same as namestem], loop count and frame rate [24]. Without arguments the function will display its usage.

1. These functions only work in the Bourne shell (sh) and their derivatives (like ash, bash, ksh and zsh). These functions do not work in the C shell (csh) or their derivatives (like tcsh), and cannot be used in DOS batch scripts either.

2. gmt_shell_functions.sh were first introduced in GMT version 4.2.2 and have since been regularly expanded with other practical scripting short-cuts. If you want to suggest other functions, please do so by adding a New Issue request on gmt.soest.hawaii.edu.