C-PLOT

Scientific Graphics and Data Analysis

10.2. - do take commands from a file



instructs C-PLOT to take input from an ASCII file. This command file may contain frequently used or complicated sequences of commands. The text in the file is in the same format as if the commands had been typed from the keyboard.
do [cmd_file]
or
do cmd_file arguments ...
Command files contain characters and newlines in the same sequence that you would type at the keyboard. Command files can be nested -- that is, a command file can invoke other command files -- up to four deep. If the argument cmd_file is the single character ., the same file as last time is used.

Without parameters, do will print the name of the current command file and prompt for the name of a new command file. You will not be able to pass arguments if you specify the command file this way.


Instructing the program to execute a command file by typing docmd_file changes the prompt from PLOT-> to plot1->. The number 1 indicates the level of nesting. The commands in the file cmd_file will then be executed in sequence. When the commands in the file are exhausted, program input reverts to the keyboard, except for the case of an ex command in the file, which will immediately terminate the plot program.

A command file can be invoked when entering the program by giving the name of the file as an argument in the shell command line. This feature lets you run the program as a background process. See "Running In Batch Mode" at the end of this chapter.

Command files can be created with make command file, mk; save current format, sf; or a text editor.