Sponsored Content
Top Forums Shell Programming and Scripting Help with script to create printers on unix Post 302419460 by ggoliath on Friday 7th of May 2010 08:25:48 AM
Old 05-07-2010
No i don't have to do a lpshut, as we use the cups software...
The diffs.txt file displays the printers i need to amend.
Code:
device for 0117bd1: lpd://172.25.xx.xx:515
device for 2201bl7: socket://172.25.xx.xx:9100

in this instance the printers differ by the IP address, that will be the reason to delete then recreate it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

quering unix boxes for attaced printers

Greetings All, I was wanting some info seeing i am a ms geek looking to go into UNIX if i want to query a UNIX box for info regarding printers, LPDs and such source how would i go about this !!!! All comments that would point me in the right direction would be most useful. Cheers (1 Reply)
Discussion started by: seekerO
1 Replies

2. Shell Programming and Scripting

How To create Flat Files using Unix Shell Script?

Hi all, How to create Flat Files using Unix Shell Script. The Script is supposed to be sheduled to run at a particular time? Thanks in advance Appu (4 Replies)
Discussion started by: Aparna_k82
4 Replies

3. UNIX for Advanced & Expert Users

Password protect UNIX printers?

Is there a way to password protect a printer that is on a LAN network? Our security officer said our UNIX printers need to be password protected. Is this possible? I am running Solaris 7 and 8... Thanks in advanced for any suggestions. (4 Replies)
Discussion started by: rtoba
4 Replies

4. Shell Programming and Scripting

Script for reporting network printers

Does anyone have a script that would detect (and create a flat-file) of all printing devices (printers/plotters) attached on a network? I need a single script or tool that would allow me to collect a data file for our asset management tool. Example format: manufacturer, model name, serial... (0 Replies)
Discussion started by: glefko
0 Replies

5. Shell Programming and Scripting

How to create xls file using unix script

Hi All, I want to create an xls file using shell script. I mean that I have written one script. It is having sql output. So I want to save that sql output into one xls file and I want to send that file as a attachment to my team MAIL_IDs. Can You any guy help me in this? Thanks in... (3 Replies)
Discussion started by: raghu.iv85
3 Replies

6. Shell Programming and Scripting

How to create a file with full permission in unix script

In my script, I am creating a file ----> then writting one line (i.e. Timestamp) ----> then FTP'ing. The same script can be executed by many other users. While other users executing this script, they couldn't Over write this one line (i.e. Timestamp) My expectation So I wanted to create a... (2 Replies)
Discussion started by: sbmk_design
2 Replies

7. AIX

AIX Bunch of printers queue creation script - HELP

I'd seek for help on how to create a bunch of printers in AIX 6.x or equal or above in one go – say like I have 35 printers to create in 4 different AIX Nodes every month – I currently create it manually like below:- How can I automatic this creation on all the 4-5 Nodes – not actually automatic... (3 Replies)
Discussion started by: shiv2001in
3 Replies

8. UNIX for Dummies Questions & Answers

Unix script to create a backup on a remote computer

Hello, I have a problem - I attended a UNIX course a couple of years back but, unfortunately, I don't remember how to write scripts for shell commands. Now I want to make a script that makes a backup of a folder on a remote computer and I have no idea how to begin. :D So the idea is that I want... (3 Replies)
Discussion started by: Benedit
3 Replies

9. Shell Programming and Scripting

Need a script to add mutiple printers in solaris box

Hi , i need to configure around 80 printers in a server. can someone please help me with the script. i have a file that has printer name and its ip. like. printer1 1.1.1.1 printer2 0.0.0.0 and so on.. can some one please help me to do it via script. i am using solaris 10 ... (0 Replies)
Discussion started by: chidori
0 Replies

10. Shell Programming and Scripting

Create a UNIX script file with multiple commands

Hi Good morning all, I want to create script file with multiple commands. For ex: pmrep connect is one of the command to connect to repository. pmrep objectexport is another command to export objects to a file. These commands should run sequentially.But when i try to execute this, the first... (4 Replies)
Discussion started by: SekhaReddy
4 Replies
conv_lpd(1M)						  System Administration Commands					      conv_lpd(1M)

NAME
conv_lpd - convert LPD configuration SYNOPSIS
conv_lpd [-c printers | -c printcap] [-n] file DESCRIPTION
conv_lpd converts LPD printer configuration information from file to a printers.conf or a printcap file (see printers.conf(4)). file specifies the name of the input file, and can be either in printers.conf or printcap format. If file is in printers.conf format, it con- verts it to a printcap file. If file is in printcap format, it converts it to a printers.conf file. OPTIONS
The following options are supported: -c printers | -c printcap Specifies the type of output file produced by the conversion. -c printers converts to a printers.conf file. -c printcap converts to a printcap file. -c printers is the default. -n Preserves the namelist during the conversion. OPERANDS
The following operands are supported: file The file to be converted. EXAMPLES
Example 1 Converting a printcap file to a printers.conf file. The following example converts a printcap file to a printers.conf file. example% conv_lpd /etc/printcap Example 2 Converting a printcap file to a printers.conf file and preserving the namelist. The following example converts a printcap file to a printers.conf file and preserves the namelist. example% conv_lpd -c printers -n /etc/printcap Example 3 Converting a printers.conf file to a printcap file and preserving the namelist. The following example converts a printers.conf file to a printcap file and preserves the namelist. example% conv_lpd -c printcap -n /etc/printers.conf EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. FILES
/etc/printers.conf System printer configuration database. /etc/printcap SunOS 4.x printer capability database. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpcu | +-----------------------------+-----------------------------+ SEE ALSO
lpset(1M), printers.conf(4), attributes(5) SunOS 5.11 9 Sep 1996 conv_lpd(1M)
All times are GMT -4. The time now is 04:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy