12-27-2012
You've gotten 17 ifs in your code snippet but 11 fis only, so I guess there sth. wrong with those. Taking a closer look, the if [ "$response" != "yes" ] seems to be missing one, but, more related to the syntax error that you quote, every if [ "$option-oki"...] has an unterminated if - elif - elif construct in it, which will bother bash if it reaches the esac statement. Pls correct and come back with the result.
BTW, did you consider bash's select statement to offer and read a selection? And, I'd prefer to put the respective options every printer offers into an option file that you can print out for selection and that you can easily adapt should a new printer model come in. Plus, why don't you collect e.g. all three-tray-printers into one single question (option_OKI between 1 and 6 -> ask for tray) and generate the printer driver name from the few variables read in answer?
Last edited by RudiC; 12-27-2012 at 01:37 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to use my linux box as a print server for my hp printer. I downloaded the linux driver for the printer and installed it. I also configured CUPS and printed a test page with it. Samba is allowing my windows machine to see and install the printer, but when i try to print to it, nothing... (1 Reply)
Discussion started by: Spetnik
1 Replies
2. Linux
I keep getting a access denied error when I install from the XP wizard my Linux shared printer.
CUPS CONFIGURATION FILE
<Location /admin>
#
# You definitely will want to limit access to the administration functions.
# The default configuration requires a local connection from a user who
#... (2 Replies)
Discussion started by: Alux
2 Replies
3. Shell Programming and Scripting
I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript.
here is my script
$ cat test.sh
#ksh
for testcase
do
program <<-EOF | tee -a funcscnlog.log
y... (3 Replies)
Discussion started by: hogger84
3 Replies
4. Linux
Hi all,
I am currently working on building a GUI to be interfaced with CUPS 1.3.4 package; In my GUI I have a list of printer manufacturers mapped
With various printer models ; and for a particular printer model selected I needed to know how to map that model with an Appropriate ppd file; as I... (0 Replies)
Discussion started by: sc3008
0 Replies
5. UNIX for Advanced & Expert Users
I want to make a script to automate printer adding task.My inputs are like
Printer name : xyz
Port number :9001
I should write a script to make the Printer adding task will be automated.
Like in manually adding task we are doing through hppi or jetadmin tools.
---------- Post updated at... (2 Replies)
Discussion started by: AnilKPatnaik
2 Replies
6. Red Hat
Just got an HP OfficeJet L7680 printer but there are no drivers for it in RHEL5. I just want to add the single driver without installing hplip 3.9.8. It's going to be connected with USB. Is this possible and if so how? (1 Reply)
Discussion started by: deloev
1 Replies
7. SCO
hi
Howto replace Line Printer Daemon (LPD) with CUPS on SCO 5.0.6? (3 Replies)
Discussion started by: ccc
3 Replies
8. UNIX for Dummies Questions & Answers
I have a RHEL 4 (probably not important, but whatever) machine with a few dozen network printers set up in CUPS. I would like to replicate this on a second machine.
With lpinfo I'm able to get the queue name and device information (socket://ipaddress or whatnot), but I haven't get figured out... (0 Replies)
Discussion started by: kknigga
0 Replies
9. Red Hat
Hi,
I am running Linux box with
samba-3.0.33
cups-1.3.7
When I access my home folder through windows and give user credentials, it works well but shows all the printers icons as well.
I would like to hide them all from users. I tried changing Browsing On to Browsing Off in... (1 Reply)
Discussion started by: amit_spl
1 Replies
10. Solaris
Need to find a way to import an LP printers.conf file to CUPS. I have some new Solaris 11.1 boxes that need to have 300 printers added. (0 Replies)
Discussion started by: os2mac
0 Replies
LEARN ABOUT ULTRIX
lprsetup
lprsetup(8) System Manager's Manual lprsetup(8)
Name
lprsetup - printer spooler set up program
Syntax
/etc/lprsetup
Description
The command provides an interactive easy-to-use facility for administrating the line printers on your system. The program contains on-line
help and default answers to questions about adding, deleting, or changing the characteristics of any of the line printers on your system.
Whenever a question is asked, the default selection is given in ] . You can press Return in response to the question to accept the
default, or enter an alternate value for the given parameter.
The program knows about all of the possible symbols in the file. See for a current list. After you have entered a printer specification,
and have verified that it is correct, then creates the spooling directory, links the output filter, and creates an entry for the new
printer.
If the printer is connected to your system, you must specify the printer device name which is in the lp printcap entry.
If lp is set to nn you are prompted to choose between or If your printer is connected to a port on your system, choose the default setting,
If you choose you are prompted for the baud rate, br. The default is the recommended baud rate for the printer.
If you want to set up your printer to a LAT line, choose the option. At this point, proceeds only if you have chosen a valid LAT device
for lp. It assumes that the LAT device has been configured for host initiated connections using If it has not, you must do this before the
queue works. For information about how to set up a LAT line, see Chapter 3 of the Guide to Ethernet Communications Servers.
If lp is set to another device, for example the program assumes that you are setting up a printer with a parallel port, for example, It
does not prompt you for device type information, and serial port specific entries are not put into the entry.
See Also
printcap(5), lpc(8), MAKEDEV(8)
Guide to Ethernet Communications Servers
Guide to System Environment Setup
lprsetup(8)