home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2
/
Openstep-4.2-Intel-User.iso
/
usr
/
lib
/
NextPrinter
/
Server
/
lpd.comm
< prev
next >
Wrap
Text File
|
1995-04-12
|
887b
|
31 lines
#!/bin/sh
# lpd interface script for prserver.
# We use sh instead of csh here because it is faster. Especially, no .cshrc.
# Note that this script is NOT used with the "if" case.
# Make sure we do not get the wrong TranScript filter.
PATH=/bin:/usr/bin:/usr/ucb:/usr/lib/transcript
export PATH
# Cannot pass file parameter through to prserver. It will be hooked up to stdin.
while test $# != 0; do
case "$1" in
-f) FILE=$2; shift;;
-p) PRINTER=$2; shift;;
-n) USER=$2; shift;;
-h) HOST=$2; shift;;
*) ;;
esac
shift
done
PRSERVER="/usr/lib/NextPrinter/Server/prserver -p $PRINTER -n $USER -h $HOST -f -"
FILTER=`basename $0`
case $FILTER in
pstf) pscat | $PRSERVER;;
psgf) psplot | $PRSERVER;;
psnf) psdit | $PRSERVER;;
psdf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
psvf|pscf|psrf) psbad $FILTER $PRINTER $USER $HOST | $PRSERVER;;
esac