10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have tried executing one particular query through perl.But I am unable to get the result. When I tried to execute the sysdate query its working when I executed my perl code.
The below query doesn't work.
QUERY 1:my $sql ="select name from tab where rownum <6";
Received ora error... (23 Replies)
Discussion started by: ramkumar15
23 Replies
2. Programming
Hi ,
Im using the below script to find the Good and Bad for the file permission.
$rc=`find /etc/security/opasswd -perm 0600 -print -ls`;
if($rc == 1)
{
print "GOOD: AD.1.8.4.1: The file /etc/security/opasswd exists and had permission 0600\n\n";
... (6 Replies)
Discussion started by: gsiva
6 Replies
3. Shell Programming and Scripting
Hi ,
I am facing error in perl
when I assign a below query in a varibale $query because of new line charchters
$query=
SELECT XYZ
, ABC
, c2
, c3
, c4
FROM t1
how can i get rid of new line charchters with out changing the... (2 Replies)
Discussion started by: gvk25
2 Replies
4. Shell Programming and Scripting
Hi,
I am new to perl.How to query oracle database with perl???
Thanks (1 Reply)
Discussion started by: tdev457
1 Replies
5. Shell Programming and Scripting
When i run script with option 1 it works, however if I assign path to variable $tmpfile and try to use that it writes to $tmpfile and not /var/tmp/abc.tmp, what am I missing?
1.
open (CAPTURE, '>>tmpfile');
print CAPTURE "$T1,$T2,$T3";
close (CAPTURE);
2.
my $tmpfile='/var/tmp/abc.tmp';... (10 Replies)
Discussion started by: gefa
10 Replies
6. Shell Programming and Scripting
Hello people.
I have got the following script
QM=ARGV;
open (CHS_OUT, "echo 'DISPLAY QSTATUS(SYSTEM.CLUSTER.MY.QUEUE) all'|runmqsc $qm|");
while (<CHS_OUT>)
{
if ( /QUEUE\(/ )
{
$QueueName = ValueParser("QUEUE", 6);
}
if ( /IPPROCS\(/ )
{
$InpProcs = ValueParser("IPPROCS", 8);
#print... (3 Replies)
Discussion started by: King Nothing
3 Replies
7. Shell Programming and Scripting
How to redirect postgresql select query to a variable using shell scripts?
I tried to use
psql -c "select ip from servers" db | egrep '+\.+\+\+' | sed 's/^ *\(.*\) *$/\1/'
Output:
10.10.10.180
10.10.10.181
It display ip addresses from the databasem, but how could i redirect the... (3 Replies)
Discussion started by: uativan
3 Replies
8. UNIX for Dummies Questions & Answers
can any1 give me line by line explanation for the following perl script
as i dunno perl .. n i have searched in google .. but still thn i wanna confirm my findings fro perl experts :mad:
perl -e 'while (<>)
{
print;
$num = 2 if /fail_halt/i;
$num = 1 if (/failure/i && ($num < 1));
}... (2 Replies)
Discussion started by: Dana Evans
2 Replies
9. Shell Programming and Scripting
a file test.dat has the following
David Veterinarian
John Orthopedist
Jeff Dentist
perl -p -e "s/\s*(\w+).*/$1/;" test.dat ......will print
David
Jonh
Jeff
how does the part in double quotes work out.... (1 Reply)
Discussion started by: bishweshwar
1 Replies
10. Shell Programming and Scripting
Hi All,
This is quite a high level question so I appologise as if it sounds a bit woolly!
I'm running a script via apache's cgi-bin that calls another Perl script (from a browser):
http://192.168.000.000/cgi-bin/run_script.pl?SCRIPT=test.pl&text=RANDOM+TEXT&INPUT1=444444444444
This... (4 Replies)
Discussion started by: pondlife
4 Replies
ARES_QUERY(3) Library Functions Manual ARES_QUERY(3)
NAME
ares_query - Initiate a single-question DNS query
SYNOPSIS
#include <ares.h>
typedef void (*ares_callback)(void *arg, int status,
int timeouts, unsigned char *abuf, int alen)
void ares_query(ares_channel channel, const char *name,
int dnsclass, int type, ares_callback callback,
void *arg)
DESCRIPTION
The ares_query function initiates a single-question DNS query on the name service channel identified by channel. The parameter name gives
the query name as a NUL-terminated C string of period-separated labels optionally ending with a period; periods and backslashes within a
label must be escaped with a backslash. The parameters dnsclass and type give the class and type of the query using the values defined in
<arpa/nameser.h>. When the query is complete or has failed, the ares library will invoke callback. Completion or failure of the query may
happen immediately, or may happen during a later call to ares_process(3) or ares_destroy(3).
The callback argument arg is copied from the ares_query argument arg. The callback argument status indicates whether the query succeeded
and, if not, how it failed. It may have any of the following values:
ARES_SUCCESS The query completed successfully.
ARES_ENODATA The query completed but contains no answers.
ARES_EFORMERR The query completed but the server claims that the query was malformatted.
ARES_ESERVFAIL The query completed but the server claims to have experienced a failure. (This code can only occur if the
ARES_FLAG_NOCHECKRESP flag was specified at channel initialization time; otherwise, such responses are ignored at the
ares_send(3) level.)
ARES_ENOTFOUND The query completed but the queried-for domain name was not found.
ARES_ENOTIMP The query completed but the server does not implement the operation requested by the query. (This code can only occur
if the ARES_FLAG_NOCHECKRESP flag was specified at channel initialization time; otherwise, such responses are ignored at
the ares_send(3) level.)
ARES_EREFUSED The query completed but the server refused the query. (This code can only occur if the ARES_FLAG_NOCHECKRESP flag was
specified at channel initialization time; otherwise, such responses are ignored at the ares_send(3) level.)
ARES_EBADNAME The query name name could not be encoded as a domain name, either because it contained a zero-length label or because it
contained a label of more than 63 characters.
ARES_ETIMEOUT No name servers responded within the timeout period.
ARES_ECONNREFUSED No name servers could be contacted.
ARES_ENOMEM Memory was exhausted.
ARES_EDESTRUCTION The name service channel channel is being destroyed; the query will not be completed.
The callback argument timeouts reports how many times a query timed out during the execution of the given request.
If the query completed (even if there was something wrong with it, as indicated by some of the above error codes), the callback argument
abuf points to a result buffer of length alen. If the query did not complete, abuf will be NULL and alen will be 0.
SEE ALSO
ares_process(3)
AUTHOR
Greg Hudson, MIT Information Systems
Copyright 1998 by the Massachusetts Institute of Technology.
24 July 1998 ARES_QUERY(3)