From: Gary Munroe <GMUNROE () flemingc ! on ! ca>
To: tru64-unix-managers
Subject: KSH Script
Date: Tue, 14 Dec 1999 19:30:44 +0000 [thread overview]
Message-ID: <96079091516355.tru64-unix-managers.marc@archive.invalid> (raw)
I'm trying to do a little KSH script that will give a user a menu that
they can list printers on the system, check printer status, and send
printing. I have come up with the following so far to save the printer
names in an array so that the user just selects printer by number:
for foo in $(/usr/sbin/lpc status|grep ":");do
let ctr+=1
prtrs[ctr]=${foo%:lp*}
done
I am still getting the colon (:) at the end of the printer name which I
need to get rid of to use in the printer commands. Does anyone
have any suggestions on getting rid of it (or better way of doing it?)
Thanks.
___________________________________________________________________
| Gary Munroe |
|------------------------------------------------------------------|
| I.T.S., Information Services Group Work: gmunroe@flemingc.on.ca |
| Sir Sandford Fleming College Home: izzi@calweb.com |
| (705) 749-5523 x1409 |
|__________________________________________________________________|
reply other threads:[~1999-12-14 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox