home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gossip.pyramid.com!olivea!inews.Intel.COM!fxrs!glewis
- From: glewis@fws204.intel.com (Glenn M. Lewis - ICD ~)
- Newsgroups: comp.lang.perl
- Subject: Perl Printer Daemon?
- Message-ID: <GLEWIS.92Nov11121920@fws204.intel.com>
- Date: 11 Nov 92 20:19:20 GMT
- Sender: news@inews.Intel.COM (USENET News System)
- Reply-To: glewis@pcocd2.intel.com
- Distribution: comp
- Organization: Intel Corporation, Folsom, CA
- Lines: 45
- Nntp-Posting-Host: fws204
-
-
- I have a peculiar application, for which I think Perl would be
- a good candidate to get the job done, but need input and advice.
-
- I would like to start up a Perl script on my UNIX workstation
- that simply looks in a directory for any file. If no file is there,
- sleep for a little while and then check again. If there *is* a file,
- I would like the script to perform an eensy bit of filtering on it
- (strip out ^M and ^D), and then send it off to a UNIX printer, using
- "lpr" and the "-r" flag to remove the file. (I have very little
- understanding of "cron" or if "cron" could be used by an average-joe
- [read: non-super] user to make sure this script is always running, but
- that is a side issue that maybe someone could teach me about.)
-
- I could probably figure out how to do the above part, with a
- little time. Now comes the tricky part... I would like this script
- to also check the printer queue every so often, to see if it is making
- progress. Yes, this sketchy, because huge print jobs will take a long
- time, and from the "lpq" standpoint, it is not easy to determine if
- progress is being made. Neglecting this side issue, if the script
- determines that progress is *not* being made, I would like it to:
-
- 1) Log into a remote machine with an embedded username and
- password (which should be secure, btw),
- 2) Execute commands on the remote machine to get the printer going
- again, and
- 3) logout of the remote machine and continue checking the
- directory.
-
- Does all this seam feasible? Any e-mail replies would be
- greatly appreciated!
- Thanks!
-
- -- Glenn Lewis
-
- P.S. If you are saying to yourself "Why does he want to do *that*?"...
- I have a network of PC's I want to print on a UNIX printer. I
- can write files to a UNIX directory from those PC's, but they
- have crud in them like ^M's and ^D's that I need to strip. The
- challenge is that this printer daemon goes down about every 2
- hours and needs restarting, and only I know how, in our group,
- and our operations wants to keep it that way. So I wish to
- automate it. Does this make sense? Thanks again.
- --
- Glenn Lewis | glewis@pcocd2.intel.com | These are my opinions...not Intel's
-