From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079091516355.tru64-unix-managers.marc@archive.invalid> From: Gary Munroe Date: Tue, 14 Dec 1999 19:30:44 +0000 To: tru64-unix-managers Subject: KSH Script X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079091516355 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 | |__________________________________________________________________|