Batch Mode Usage
Question:
Is there a way to run Ferret in genuine batch mode?
Solution:
In PyFerret, use the -nodisplay switch instead of -gif or -batch. The FRAME command will determine the output graphics file type. The -script command-line switch works the same in PyFerret as in Ferret; as does the redirection described below.
1) You may use the command-line switches -gif, -batch, -script to run Ferret in batch mode. Note that -batch and -gif offer different forms of graphics output. See the Ferret documentation for details of these options. For example to run a script which produces gif images and takes arguments:
% ferret -gif -script my_ferret_script.jnl 5 2 1
% pyferret -nodisplay -script my_ferret_script.jnl 5 2 1
2) In addition, you can use redirection to pass a script to Ferret, or PyFerret. for example
% ferret < my_ferret_script.jnl
and also redirect output
% ferret < my_ferret_script.jnl > script_output.txt
You can also place commands to ferret within a shell script,
ferret << STOP plot/i=1:10 i list/i=1:10 i*3 STOP
In short, Ferret can be treated as other executables, redirecting input and its output.