next up previous contents index
Next: 4.6 Usage messages, syntax- Up: 4. General features Previous: 4.4 Standardized command line   Contents   Index


4.5 Command Line History

GMT programs ``remember'' the standardized command line options (See previous section) given during their previous invocations and this provides a shorthand notation for complex options. For example, if a basemap was created with an oblique Mercator projection, specified as


-Joc190/25.5/327/56/1:500000

then a subsequent psxy command to plot symbols only needs to state -Jo in order to activate the same projection. Previous commands are maintained in the file .gmtcommands, of which there will be one in each directory you run the programs from. This is handy if you create separate directories for separate projects since chances are that data manipulations and plotting for each project will share many of the same options. Note that an option spelled out on the command line will always override the last entry in the .gmtcommands file and, if execution is successful, will replace this entry as the previous option argument in the .gmtcommands file. If you call several GMT modules piped together then GMT cannot guarantee that the .gmtcommands file is processed in the intended order from left to right. The only guarantee is that the file will not be clobbered since GMT now uses advisory file locking. The uncertainty in processing order makes the use of shorthands in pipes unreliable. We therefore recommend that you only use shorthands in single process command lines, and spell out the full command option when using chains of commands connected with pipes.


next up previous contents index
Next: 4.6 Usage messages, syntax- Up: 4. General features Previous: 4.4 Standardized command line   Contents   Index
Paul Wessel 2001-04-18