It is possible to run IRAF scripts as background jobs. It is necessary
to prepare a Unix shell script which starts IRAF and then runs the
IRAF script. File background.csh is an example shell script.
It is shown in Figure
. This example invokes IRAF
and uses it to run script submean.cl.
The script first ensures that a C shell is used, if it is run as an executable shell script, then IRAF is started and fed with commands. Notice how the $ signs need to be escaped in the task definition to stop the UNIX shell from interpreting them as shell variables. The output is written to file log.file. There is further information about shell scripts in SC/4: C-shell Cookbook[6]).
The script is run from the Unix shell prompt. Simply type:
background.csh &
Output will be written to file log.file. Remember that script submean.cl will only run successfully if image newframe does not already exist.
An Introduction to IRAF