...
i want to put a title abve the status one called "warning" and "critical" above the status 2. but i want it only about the first one of each section
hope that makes scene
...
No, it does not make sense.
Your "printf" statements do not have newlines. Hence, all output will be on one long line. All output for status = 1 as well as status = 2 will be on one long line.
Since outputs per status are not separated, there is no way to add a title "above" a particular status. You can, however, put a title either above or below the long output line that your program prints. I believe that's not what you want.
You may want to post some sample input and corresponding sample output so that your problem is clearer to understand.
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Hi,
Is there any way I can grep an array against another array?
Basically here's what I need to do.
There will be an array containing some fixed texts and I have to check whether some files contain these lines. Reading the same files over and over again for each different pattern doesnt seem... (1 Reply)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi everyone
I have one question about using array in perl. let say I have several log file in one folder.. example
test1.log
test2.log
test3.log
and the list goes on..
how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Hi All ,
Below is the perl code. from below code want to confirm one thing that
wahtever the sequence of data we are passing through json format which contains 3 tuples of different sequences
Eg:
ParentID,SystemID,SendingTime,Time,ClientLocation,ClientID,
... (1 Reply)
Hi all, i am using the following code to that use curl to that outputs a json, i am stuck it into a hash but i canot figure out how to get just the value i need ( hostname)
here is my code
use warnings;
use strict;
use Data::Dumper qw(Dumper);
##use JSON;
use JSON::XS;
my $curl=... (2 Replies)
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Discussion started by: vinshas1
11 Replies
LEARN ABOUT ULTRIX
lpstat
lpstat(1) General Commands Manual lpstat(1)Name
lpstat - printer status information
Syntax
lpstat [ options ]
Description
The utility prints the status of the system printers.
Without any options, prints the status of print requests made to the default printer.
This command exists for X/OPEN compatibility.
Options
Some of the options can be followed by a list of arguments. The arguments must be specified as follows:
lpstat -uuser1,user2,user3
List items can be separated by spaces, but the list must be enclosed in quotes. If you do not include any arguments, all the information
relevant to the option is printed.
The valid options for are:
-a (R)[ printer1, printer2, ... (R)]
Print whether or not printers are accepting print requests.
-d Print the name of the default system printer.
-o (R)[ printer1, printer2, ... (R)]
Print the status of print requests.
-p (R)[ printer1, printer2, ... (R)]
Print the status of printers.
-r Print the status of the line printer daemon,
-s Print a status summary, including the status of the line printer daemon and the default system printer.
-t Print all status information.
-u (R)[ user1, user2, ... (R)]
Print the status of users' print requests.
See Alsolp(1), lpq(1), lpr(1), lpc(8)lpstat(1)