1 #!/bin/ksh -
2
3 STDIN_TMP_FILE=/tmp/psprint.$$
4
5 GS=/usr/local/bin/gs
6 GSLIB=/usr/local/lib/ghostscript/3.53
7 RM=/bin/rm
8 #
9 # define print command (SYSV or BSD ish)
10 # PRINT="lp -or -s"
11 PRINT=lpr
12
13 if [ $# -eq 0 ]; then
14 cat > "${STDIN_TMP_FILE}"
15 set "${STDIN_TMP_FILE}"
16 fi
17
18 for i in $* ; do
19 ${GS} -sDEVICE=ljet4 -r600 -sOutputFile="|${PRINT}" -q -DNOPAUSE "$i" \
20 ${GSLIB}/quit.ps
21 done
22
23 ${RM} -f "${STDIN_TMP_FILE}"
24
25 exit 0
26