File: dscat

package info (click to toggle)
dstooltk 2.0-3
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 2,500 kB
  • ctags: 3,169
  • sloc: ansic: 27,185; tcl: 4,770; makefile: 587; sh: 70; csh: 7
file content (22 lines) | stat: -rwxr-xr-x 632 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/csh
#
# script to cat together (overlay) two or more dstool postscript files
#
# This script comments out each "showpage" command and then 
# appends a single "showpage" at the end of the document.
# The output is sent to stdout and should be redirected or piped
# through lpr
# Ex: If the files p1.ps, p2.ps, and p3.ps are to be overlayed, use
#     		pscat f1.ps f2.ps f3.ps | lpr
# 	OR  	pscat f?.ps > newfile
# 	OR  	pscat f*    > newfile
#     OR even 	pscat f[123].ps | lpr
#
if($#argv < 2) then
	echo "Usage: pscat file1 file2 ..."
	exit 1
endif

cat $argv[1-$#argv] | sed s/showpage/%showpage/
echo "showpage"
exit 0