C-PLOT

Scientific Graphics and Data Analysis

10.8. - Running in batch mode



Batch mode means C-PLOT is run as a background process taking input from a command file. Usage is:
cplot [-s] cmd_file [command_file_args] [</dev/null]
The -s option silences C-PLOT's output, except for error messages, which are still written to the standard error stream.

The optional </dev/null ensures that C-PLOT can detect it is running in the background. When C-PLOT is running in the background, the w command and other interactive commands are disabled.

Presumably you will want to direct the output somewhere other than to the screen of the terminal you are working on. From the Bourne shell (/bin/sh), you could type:
cplot ... >/dev/null 2>&1 &
This form directs the standard output to the UNIX sink (/dev/null), where it won't be seen again and directs the error output (attached to file descriptor 2) to join the standard output (file descriptor 1). Alternatively, you can direct both output streams to a regular file, or direct the streams to two different destinations.

From the Berkeley C-shell (/bin/csh), you can direct both output streams in the following fashion:
cplot ... >&record_file &
In this example both streams are directed to a file.

If you invoke C-PLOT with a command file, but in the foreground, the program will revert to interactive mode when the command file is exhausted, unless the command file contains the exit command, ex. An ex in a command file always terminates the program.