[comp.sys.sun] fooling SUN4 to use SUN3 Transcript

marcel@nluug.nl (Marcel Bernards) (03/11/89)

Hi there SUN users,

We have a bunch of sun3 machines using Transcript software.  The last
month, a 4/110 arrived. We didn't have Transcript software like enscript
for the 4/110 (and our 4/280 server) I used the following  shell trick to
let the users on the SPARCS use enscript:

---8<--8<--8<----nip-nip-

#! /bin/sh
#
# This shell script tricks the SUN4 to use the SUN3 Transcript software
# 
OPT="-"
LOPT=" "
BOPT=""
while getopts 12BGghKklMmoqRrL:f:F:b:p:P:#:J:C: argv
do
	case $argv in
	1|2|B|G|g|h|K|k|l|M|m|o|q|R|r)	OPT=$OPT$argv;;
	L|f|F|J|p|P|\#|C)		LOPT="-$argv$OPTARG $LOPT";;
	b)				BOPT="-$argv$OPTARG";;
	\?)	echo "usage $0 [ -12BGghKklMmoqRr ] [ -Llines ]"
		echo " [ -ffont  ] [ -Fhfont ] [ -bheader ] [ -pout ]"
		echo " [ spoolopts ] [ files ]"
		exit 1;;
	esac
done

shift `expr $OPTIND - 1`
for file in "$@"
do
	if [ $BOPT ]
	then
           cat $file | rsh ${LASER:-laser1} enscript $OPT $LOPT $BOPT
	else
           cat $file | rsh ${LASER:-laser1} enscript $OPT $LOPT -b$file
	fi
done
exit 0

---end-----

We use YP on our machines. ( sometimes ;-( ) You probably can also use
rexec if your home dir is also mounted on the sun3.  The only difference
is that the label is not printed in the gaudy banner but just above.....
Hope You ca use it..

Marcel Bernards, UNIX & Net sysadm Netherlands Energy Research Foundation ECN
P.O. Box 1, 1755 ZG Petten, PHONE: 09 312246 4342 EARN/BITNET:ESU0130@HPEENR51 
IP: marcel%ecn.uucp@nluug.nl UUCP: marcel@ecn.uucp,marcel%ecn.uucp@uunet.uu.net