Library next up previous contents
Next: Online Help Up: Standard Parameter Previous: Standard Parameter

Specifying filenames

Also all programs of the toolbox are separated, the share the most of the code. That is the reason why the handling of the programs is equal except for some special features. Controling of the programs is done by specifying parameters in the program call. Without any options all programs will read from standard input perform some operations, using default options and writing the result to standard output. To read in data from a file, the parameter -f must be used.

        gr_copy -f test.dat

will read data from the file test.dat and print the data from test.dat on the screen. In the same way the input file is specified, an output filename can be specified:

        gr_copy -f test.dat -o test2.dat

This will read in the data from test.dat and writes them to the file test2.dat. Since gr_copy is the identical mapping of the points, no operation is performed on the data. So test.dat and test2.dat will contain the same point data information. But the files might not be exact the same, cause the output is always formatted in a certain way, which is independent from the input format. For example, although the coordinates in test.dat where separated by a comma, the coordinates in test2.dat will normally be separated with a blank. So, the gr_copy routine is quite different to the unix command cp.

The order of parameters never matters. The result of

        gr_copy -o test2.dat -f test.dat
is the same as
        gr_copy -f test.dat -o test2.dat

This holds true for all parameters. And this explains why a parameters are demanded for every argument. All tools are designed in the way, that, if no specific parameters are given, default values for the parameters are taken. The default paramters shall represent a useful option for the program.

Jens Trapp
Wed Jun 12 20:34:13 MET DST 1996