Next: 5 RA DEC Formats Up: 4 Text Output Prev: 4 Text Output

Spooling

ASTERIX applications create printable output files in a number of forms. Each of these forms has a name,

LIST
Plain ascii text
FORTRAN
Fortran carriage control
PS
Postscript
The system commands used to send these outputs to a printer are constructed by getting the value of an environment variable called AST_form_SPOOL and tacking the filename (which may be a temporary filename on some systems) on the end. The value of the variable might be a system command, or a command which you have defined yourself. Consider how the Fortran form is handled by ASTERIX. UNIX does not print Fortran carriage control files properly directly, so AST_FORTRAN_SPOOL is defined in the ASTERIX start up,

  csh> setenv AST_FORTRAN_SPOOL /star/asterix/bin/ast_fortran_spooler
  
This command is just a very simple csh script,

  #!/bin/csh
  fpr $1 | lpr
  
The UNIX utility fpr converts Fortran carriage control to normal ascii - the output is then piped to the lpr command which sends output to the default printer. Note that the execution bit of such scripts must be set using chmod before ASTERIX can use them.

Another example - you have a printer with a queue called psa and you want to send ascii output to it. If the printer can take ascii directly you might use,

  csh> setenv AST_LIST_SPOOL 'lpr -Ppsa -h'
  
If it has Postscript queue then we might want to do a bit of formatting using a2ps first, in which case we write a script, eg.

  #!/bin/csh
  a2ps $1 -nn -p | lpr -Pps -h
  
uses a2ps to in portrait mode, with line numbers suppressed.

If you use any of these facilities frequently then customise your ASTERIX setup to define them when you start up ASTERIX. The current settings can be displayed using the commands,

  csh> astdefs spool
  csh> astdefs all
  


Next: 5 RA DEC Formats Up: 4 Text Output Prev: 4 Text Output