printing to remote

Kevin Meek kmeek at cti1.UUCP
Tue Jul 10 01:43:47 AEST 1990


bobb at netcom.UUCP (Bob Beaulieu) writes:

>I am having problems getting a print jobs with options thru to a remote
>system on a pyramid M1 SYSV. The remote is a Plexus P/60 SYSV.

>If I use the following in Informix sql 2.10.03k it works okay:
>report to pipe "cat | /usr/ucb/rsh <systemname> 'lp -d<printername>'"

>What I need though, is to be able to send lp commands from the prompt
>directly. I have set the 2 systems up on uucp and tried using the
>uux as: cat <filename> | uux <systemname>/lp! -d<printername>; but,
>it also isn't working right.

Bob:

I wrote the following script to print remotely using uux and have 
used it both as a program taking options or as a pipe taking std input.

It sends files to be printed at a mahcine called sea06f, and was called
sea06flp.  It takes all commands just like lp and passes them through
to the lp on the other machine.

Kevin Meek
Comprehensive Technologies Int'l Inc.
2121 Crystal Drive   Suite #103
Arlington,  VA  22202
uunet!cit1!kmeek  OR cti1!kmeek at uunet.uu.net


----------cut here-------------cut here------------------cut here----------

#  send print jobs to sea06f printers via uux
#
#  K. Meek 03/19/90
#
PRINTED='NO'
for var
do
   case "$var" in
      -* ) 
          PARAMS=$PARAMS"$1"
          shift
          continue 
          ;;
       * )
          PRINTED='YES'
          uux -C -a$LOGNAME sea06f!lp -c $PARAMS \!$var  > /usr/tmp/sea06flp.$$ 2>&1
          ;;
   esac
done

if [ "$PRINTED" = "NO" ]
then
   uux -C -a$LOGNAME -p sea06f!lp -c $PARAMS > /usr/tmp/sea06flp.$$ 2>&1
fi

if [ -s /usr/tmp/sea06flp.$$ ]
then
	echo "\007\nError trying to send print job to sea06f"
	echo "-------------------------------------"
	cat /usr/tmp/sea06flp.$$
	echo "-------------------------------------\n"
else
	echo "\nFile has been queued to print at sea06f\n"
fi
rm /usr/tmp/sea06flp.$$



More information about the Comp.unix.questions mailing list