Get a printer name into variable with similar printers
I am using a same printer vendor for 2 printer. Some of them dont have just default name with a full name of that printer.
for example
This first one CITIZEN is a part of script
But this gave me nothing, so first lines are good, it find a S310II because of cups info, but NAME is not s310, just CITIZEN. So i Can change S310II to just CITIZEN, because you see first code i posted, what gave me, two CITIZEN.
How can I just get a printer name for that S310II. This script is helped me so much, but now with this similar names are a bit strange to get it.
Hi All,
I am trying to configure printer in solaris 10 with the help of print manager. There is no printer attached to my system, ia m doing it for test purpose. However I am unable to do so coz its pops up window - Heading as error with option as dismiss and cancel. Kindly help as I am... (3 Replies)
Hello
Let me first give a small overview of the setup. All printers are connected to Windows 2000 servers. There are a lot of UNIX (AIX & HP-UX) servers as well which have SAP running.
I'm working on a script to add printers to a specified SAP instance. I want to verify the user input (to... (0 Replies)
Hello,
I'm rather new to the world of regular expressions and sed, though am excited by its possibilities. I have a particular task I'd like to achieve, and have googled the topic quite a bit. However, having found some codes that perform a task very similar to what I'd like to do, I can't for... (2 Replies)
Hi,
Is it possible to find the printer location and printer type (whether it is local or network) using command in Linux ?
Thanks in advance. (1 Reply)
I want to match the number exactly from the variable which has multiple numbers seperated by pipe symbol similar to search in egrep.below is the code which i tried
#!/usr/bin/perl
my $searchnum = $ARGV;
my $num = "148|1|0|256";
print $num;
if ($searchnum =~ /$num/)
{
print "found";
}... (2 Replies)
Hi,
I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt
Expected result :-
should get all the above file in $<Filename>_file.lst
Below is my code :-
for i in SAT BAT DUTT
do
touch a.lst
cd $datadir (1 Reply)
Discussion started by: satishmallidi
1 Replies
LEARN ABOUT REDHAT
lpstat-cups
lpstat(1) Easy Software Products lpstat(1)NAME
lpstat - print cups status information
SYNOPSIS
lpstat [ -E ] [ -a [ destination(s) ] ] [ -c [ class(es) ] [ -d ] [ -h server ] [ -l ] [ -o [ destination(s) ] ] [ -p [ printer(s) ] ] [ -r
] [ -R ] [ -s ] [ -t ] [ -u [ user(s) ] ] [ -v [ printer(s) ] [ -W [ which-jobs ] ]
DESCRIPTION
lpstat displays status information about the current classes, jobs, and printers. When run with no arguments, lpstat will list jobs queued
by the user. Other options include:
-E
Forces encryption when connecting to the server.
-a [printer(s)]
Shows the accepting state of printer queues. If no printers are specified then all printers are listed.
-c [class(es)]
Shows the printer classes and the printers that belong to them. If no classes are specified then all classes are listed.
-d
Shows the current default destination.
-h server
Specifies the CUPS server to communicate with.
-l
Shows a long listing of printers, classes, or jobs.
-o [destination(s)]
Shows the jobs queue on the specified destinations. If no destinations are specified all jobs are shown.
-p [printer(s)]
Shows the printers and whether or not they are enabled for printing. If no printers are specified then all printers are listed.
-r
Shows whether or not the CUPS server is running.
-R
Shows the ranking of print jobs.
-s
Shows a status summary, including the default destination, a list of classes and their member printers, and a list of printers and
their associated devices. This is equivalent to using the "-d", "-c", and "-p" options.
-t
Shows all status information. This is equivalent to using the "-r", "-d", "-c", "-d", "-v", "-a", "-p", and "-o" options.
-u [user(s)]
Shows a list of print jobs queued by the specified users. If no users are specified, lists the jobs queued by the current user.
-v [printer(s)]
Shows the printers and what device they are attached to. If no printers are specified then all printers are listed.
-W [which-jobs]
Specifies which jobs to show, completed or not-completed (the default).
COMPATIBILITY
Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE and TAB. Also, printer and
class names are not case-sensitive.
The "-h" option is not a standard System V option.
The Solaris "-f", "-P", and "-S" options are silently ignored.
The "-W" option is unique to CUPS.
SEE ALSO cancel(1), lp(1), CUPS Software Users Manual, http://localhost:631/documentation.html
COPYRIGHT
Copyright 1993-2002 by Easy Software Products, All Rights Reserved.
2 October 2002 Common UNIX Printing System lpstat(1)