KSH Script

From: Gary Munroe <GMUNROE_at_flemingc.on.ca>
Date: Tue, 14 Dec 1999 14:30:44 -0500 (EST)

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_at_flemingc.on.ca |
| Sir Sandford Fleming College Home: izzi_at_calweb.com |
| (705) 749-5523 x1409 |
|__________________________________________________________________|
Received on Tue Dec 14 1999 - 19:33:00 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:40 NZDT