.TH CPSDECODE l l "15 Oct 2001" .SH NAME cpsdecode \- Extract shell scripts and data files from Complete \fIPostScript\fP (CPS) file .SH SYNOPSIS \fBcpsdecode\fP [ \fIPostScript\fP-file ] [ \fB\-n\fP ] [ \fB\-v\fP ] .SH DESCRIPTION \fBcpsencode\fP [and \fBcpsdecode\fP] provide a convenient way of storing a UNIX script (or DOS batch file) and data files as part of the single \fIPostScript\fP plot the script creates. Thus, given the resulting Complete \fIPostScript\fP (CPS) file one can recreate the original script and data at a later time. \fBcpsdecode\fP reads a \fIPostScript\fP file (or stdin if none given) that previously has been augmented with output from \fBcpsencode\fP. It will then extract the embedded data files, undoing any uuencoding and compression that was performed by \fBcpsencode\fP. .OPTIONS .TP .B \-n Dryrun. No files are extracted but we report which files would be decoded|decompressed and saved to disk. .TP .B \-v Verbose. Report the progress of decoding the script and any data files referred to in the script [Default is silent]. .SH EXAMPLES Let us say you have a cshell script called Figure_8.csh which creates the \fIPostScript\fP file Figure_8.ps. Figure_8.csh operates on several data files in order to make the plot. You turn this plot file into a Complete \fIPostScript\fP (CPS) file with the command .br .sp \fBcpsencode \-v\fP Figure_8.csh >> Figure_8.ps .br .sp Alternatively, let that be the last command in the script so that it is automatically done by the script itself. .br To unscramble the CPS file, simply say .br .sp \fBcpsdecode \-v\fP Figure_8.ps .SH BUGS \fBcpsencode\fP assumes good script etiquette so that any temporary files created by your script are removed before \fBcpsencode\fP is called. Otherwise they will take up unneccesary space in the Complete \fIPostScript\fP (CPS) file. \fBcpsencode\fP will have trouble if you script changes directories with the \fIcd\fP command since filenames become relative to another directory. Using absolute paths name for files (starting with /, ~/. or ~user/) is bad practice since other users may not be able to access those files. .SH AUTHOR Paul Wessel, Geology & Geophysics, SOEST, University of Hawaii, 1680 East-West Road, Honolulu HI 96822, USA. www.soest.hawaii.edu/wessel.