NAME

       cpsdecode - Extract shell scripts and data files from Com-
       plete PostScript (CPS) file


SYNOPSIS

       cpsdecode [ PostScript-file ] [ -l ] [ -s ] [ -v ]


DESCRIPTION

       cpsencode [and cpsdecode]  provide  a  convenient  way  of
       storing  a  UNIX script (or DOS batch file) and data files
       as part of the single PostScript plot the script  creates.
       Thus,  given  the resulting Complete PostScript (CPS) file
       one can recreate the original script and data at  a  later
       time.  cpsdecode reads a PostScript file (or stdin if none
       given) that previously has been augmented with output from
       cpsencode.   It will then extract the embedded data files,
       undoing the uuencoding and compression that was  performed
       by cpsencode.
       To  simplify  file extraction, in particular for those who
       have not installed cpsdecode, the embedded files may  also
       be  extracted  using  a short Bourne shell script provided
       among the comments written to the PostScript file.  Simply
       do  a  grep on '^%CPS' to learn how to pull out the script
       with sed.  Windows (DOS) users must use the cpsdecode pro-
       gram (binaries available from the CPS web site).

       -l     List  only.   No  files are extracted but we report
              which files would be decoded and  decompressed  and
              saved to disk.

       -s     Strips  off  leading  directory paths from embedded
              file names so that all files  are  written  in  the
              current  directory regardless of path [Default uses
              embedded pathname].

       -v     Verbose.   Report  the  progress  of  decoding  the
              script and any data files referred to in the script
              [Default is silent].


EXAMPLES

       Let us say you have a cshell  script  called  Figure_8.csh
       which  creates  the  PostScript  file  Figure_8.ps.   Fig-
       ure_8.csh requires the data files topo.grd,  lines.d,  and
       captions.txt  in  order  to  make the plot.  You turn this
       plot file into a Complete PostScript (CPS) file  with  the
       command

       cpsencode  Figure_8.csh  topo.grd  lines.d captions.txt >>
       Figure_8.ps

       Alternatively, let that be the last command in the  script
       so that it is automatically done by the script itself.
       To unscramble the CPS file, simply say

       cpsdecode -v Figure_8.ps
                            1 May 2003               CPSDECODE(l)

Man(1) output converted with man2html