Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ames!eos!data.nas.nasa.gov!mustang!nntp-server.caltech.edu!news From: ktl@wag.caltech.edu (Kian-Tat Lim) Newsgroups: comp.sys.sgi Subject: Re: parallel printer use with lpr (?) Message-ID: <1991Jun5.081519.3773@nntp-server.caltech.edu> Date: 5 Jun 91 08:15:19 GMT References: <9106042131.AA26978@nazgul.physics.mcgill.ca> Sender: news@nntp-server.caltech.edu Reply-To: ktl@wag.caltech.edu (Kian-Tat Lim) Organization: California Institute of Technology, Pasadena, CA Lines: 44 In-Reply-To: loki@NAZGUL.PHYSICS.MCGILL.CA (Loki Jorgenson) We have a Tektronix Phaser II PX attached to one of our Personal Irises, which serves it to our other systems via Berkeley lpd. The printcap entry follows: color|colorps|Tektronix Phaser II PX:\ :sh:sf:tr=^D:\ :lp=/dev/plp:\ :if=/usr/local/bin/cpsf:\ :af=/usr/adm/lcd-acct:\ :lf=/usr/adm/lcd-errs:\ :sd=/usr/spool/lcd: /usr/local/bin/cpsf is a short Perl script that does some accounting: #!/usr/bin/perl sub now { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $str = sprintf("%02d/%02d %02d:%02d:%02d",$mon+1,$mday,$hour,$min,$sec); return $str; } do "getopts.pl"; &Getopts('w:l:i:n:h:'); $LOG = "STDERR"; ($log = shift) && open(LOGOUT, ">>$log") && ($LOG = "LOGOUT"); warn "Couldn't open accounting file: $!" if ($log && $LOG ne "LOGOUT"); print $LOG "$opt_n@$opt_h " . &now; while () { $num += length; print; } print $LOG " $num" . "c " . &now . "\n"; close(LOGOUT) if $LOG eq "LOGOUT"; print STDOUT "\004"; -- Kian-Tat Lim (ktl@wag.caltech.edu, KTL @ CITCHEM.BITNET, GEnie: K.LIM1) System Manager, Materials & Molecular Simulation Center, Caltech