5f5 #!/bin/csh -f #%% alias tape_prolog awk '/^%.PS/,/^%%BeginDoc//^%%EndDoc/,/^%%EndPro/' #%% alias tape_trailer awk '/^%%Trailer/,/^--eof--\$/' #%% setenv TAPEPS ~/ps/audio-tape.ps #%% alias catapes '(tape_prolog $TAPEPS;cat \!*; tape_trailer $TAPEPS)' #%% alias printapes '(catapes \!*) | lpr' # #%% 'tape_prolog' and 'tape_trailer' are 'awk' programs that will extract #%% the important part of this file. TAPEPS is a variable that points at #%% the place your copy of the file is. 'catapes' takes one or more files #%% as arguments, and splices their contents in with the PostScript code at #%% the appropriate place. #%% #%% With the above aliases, the command "printapes tape1 tape2 tape3" will #%% concatentate the PostScript code defined in this file, the definitions #%% of your labels (which presumably are the contents of the files "tape1," #%% "tape2," and "tape3"), and the necessary trailer together, and hand that #%% as input to "lpr" (or whatever command it is that you use for printing). # now our locally-modified lines: (open calls the Postscript previewer) alias tape_prolog awk '/^%.PS/,/^%%BeginDoc//^%%EndDoc/,/^%%EndPro/' alias tape_trailer awk '/^%%Trailer/,/^--eof--\$/' setenv TAPEPS ./audio-tape-123.ps alias catapes '(tape_prolog $TAPEPS;cat \!*; tape_trailer $TAPEPS)' alias printapes '(catapes \!*) | lpr' alias pvtapes '(catapes \!*) | open' alias pvtapes2 '(catapes \!*) > /tmp/tapes.ps ; open /tmp/tapes.ps' . 0