...
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 DEBIAN
ns_connreturnadminnotice
Ns_ConnReturnData(3aolserver) AOLserver Library Procedures Ns_ConnReturnData(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
Ns_ConnReturnAdminNotice, Ns_ConnReturnData, Ns_ConnReturnHtml, Ns_ConnReturnNotice - Routines to generate simple single-buffer responses
SYNOPSIS
#include "ns.h"
int
Ns_ConnReturnAdminNotice(conn, status, title, msg)
int
Ns_ConnReturnData(conn, status, data, len, type)
int
Ns_ConnReturnCharData(conn, status, data, len, type)
int
Ns_ConnReturnHtml(conn, status, msg, len)
int
Ns_ConnReturnNotice(conn, status, title, msg)
ARGUMENTS
Ns_Conn conn (in) Pointer to open connection.
int status (in) HTTP response status code.
char *type (in) Output content type.
char *title (in) Pointer to HTML page title string.
int len (in) Length of content buffer.
char *data (in) Pointer to content buffer.
char *msg (in) Pointer to HTML message buffer.
_________________________________________________________________DESCRIPTION
These routines are used to generate complete responses, including headers, status codes, content types, and the requested data. They all
return a status code which is NS_OK if the response was sent or NS_ERROR if an underlying call to sent the content failed.
int Ns_ConnReturnAdminNotice(conn, status, title, msg)
This routine is equivalent to Ns_ConnReturnNotice. In prior versions, it would format a slightly different response which was later
considered inconsequential.
int Ns_ConnReturnData(conn, status, data, len, type)
Generates a reponse with the given HTTP status including a content-type header with the given type. Content pointed to by the data
argument of length len is then sent without any modification via an underlying call to Ns_ConnFlushDirect.
int Ns_ConnReturnCharData(conn, status, data, len, type)
Generates a response as with Ns_ConnReturnData except that the given content pointed to by data is assumed to be a text stream which
is output encoded using the appropriate Tcl_Encoding based on the given type mimetype and possibly gzip compressed via an underlying
call to Ns_ConnFlush.
int Ns_ConnReturnHtml(conn, status, msg, len)
This is equivalent to Ns_ConnReturnCharData(conn, status, msg, len, "text/html").
int Ns_ConnReturnNotice(conn, status, title, msg)
Constructs a basic HTML response and sends it via Ns_ConnReturnHtml. The title string is placed both in the <head> portion as well
as an <h2> tag in the <body> portion of the document. If the title is NULL, it defaults to the string "Server Message". The msg
string, if not NULL, follows the body and is copied unaltered. This routine is useful for generating very basic responses. For
example, it is used by the various builtin reponse routines such as Ns_ConnReturnUnauthorized.
SEE ALSO Ns_ConnFlush(3), Ns_ConnReturnFile, Ns_ConnReturnOpenFd, Ns_ConnReturnUnathorized.
KEYWORDS
connnection, encoding, response
AOLserver 4.0 Ns_ConnReturnData(3aolserver)