ok I have a list of files for example:
130-4-32.HindIII.0.ids
130-4-32.HindIII.0.ppm
130-4-32.HindIII.0.ppm.gz
130-4-33.HindIII.0.bands
130-4-33.HindIII.0.ics
130-4-33.HindIII.0.ids
130-4-33.HindIII.0.ppm
130-4-33.HindIII.0.ppm.gz
130-4-34.HindIII.0.bands ... (1 Reply)
Hi,
Could anyone give me a idea how to strip the lines from a given file. example
***********
1st occurence
1st occurence
1st occurence
1st occurence
***********
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
*************
3rd occurence
3rd... (10 Replies)
I have a file oratab with entry like this
SCADAG:/esitst1/oracle/product/9.2.0.8:Y
I am trying to discover a way to change the 9.2.0.8 part of this to something like 10.2.0.4 as part of an upgrade script.
I have tried
cat /etc/oratab >>/tmp/oratab... (1 Reply)
My script needs to read a variable from the user. But before the user types the input, I want to give a default value so the user can edit the default value for input.
How can I implement it?
My script is something like:
#!/bin/sh
read -p 'Port number: ' -e port_number
echo "Port... (7 Replies)
I am new newbie to unix.
I am taking user input using ksh script.
The valid value user can enter is
a) Numeric 1 to 500
b) character e, r
c) e1 to e100
I figured out how to deal with a) and b) but want to separate characters when user enter e1 to e100
I want to store e in... (1 Reply)
I have a requirement, which is as follows
*. Folder contains list of xmls. Script has to create new xml files by copying the existing one and renaming it by appending "_pre.xml" at the end.
*. Each file has multiple <Name>fileName</Name> entry. The script has to find the first occurance of... (1 Reply)
I have a file containing dates like below
2010 1 02
2010 2 01
2010 3 05
i want the dates to be like below
20100102
20100201
20100305
i tired using
awk '{printf "%s%02s%02s",$1,$2,$3}'
But it does not work,it puts all the dates in one line,i want them in seperate lines like the... (6 Replies)
HI guys i have a question.
Question 1: how do i modify a particular string?
e.g
echo "Please enter Book Title: "
read a
echo "Please enter Author: "
read b
if ]
then echo " Record found!"
which will then pop out a menu with the follow output
1. Update Name
2.... (1 Reply)
I'm trying to create a ksh script that will ask the user for the port number. $PORT1 is the variable I want to use that will contain whatever numbers the user inputs. The script would edit ports.txt file, search and delete "./serv 110.1.0.1.$PORT1 200;=3" .
So if the user types 50243 then the... (5 Replies)
Discussion started by: seekryts15
5 Replies
LEARN ABOUT CENTOS
mail::spamassassin::dnsresolver
Mail::SpamAssassin::DnsResolver(3) User Contributed Perl Documentation Mail::SpamAssassin::DnsResolver(3)NAME
Mail::SpamAssassin::DnsResolver - DNS resolution engine
DESCRIPTION
This is a DNS resolution engine for SpamAssassin, implemented in order to reduce file descriptor usage by Net::DNS and avoid a response
collision bug in that module.
METHODS
$res->load_resolver()
Load the "Net::DNS::Resolver" object. Returns 0 if Net::DNS cannot be used, 1 if it is available.
$resolver = $res->get_resolver()
Return the "Net::DNS::Resolver" object.
$res->nameservers()
Wrapper for Net::DNS::Resolver->nameservers to get or set list of nameservers
$res->connect_sock()
Re-connect to the first nameserver listed in "/etc/resolv.conf" or similar platform-dependent source, as provided by "Net::DNS".
$res->get_sock()
Return the "IO::Socket::INET" object used to communicate with the nameserver.
$packet = new_dns_packet ($host, $type, $class)
A wrapper for "Net::DNS::Packet::new()" which traps a die thrown by it.
To use this, change calls to "Net::DNS::Resolver::bgsend" from:
$res->bgsend($hostname, $type);
to:
$res->bgsend(Mail::SpamAssassin::DnsResolver::new_dns_packet($hostname, $type, $class));
$id = $res->bgsend($host, $type, $class, $cb)
Quite similar to "Net::DNS::Resolver::bgsend", except that when a response packet eventually arrives, and "poll_responses" is called,
the callback sub reference $cb will be called.
Note that $type and $class may be "undef", in which case they will default to "A" and "IN", respectively.
The callback sub will be called with three arguments -- the packet that was delivered, and an id string that fingerprints the query
packet and the expected reply. The third argument is a timestamp (Unix time, floating point), captured at the time the packet was
collected. It is expected that a closure callback be used, like so:
my $id = $self->{resolver}->bgsend($host, $type, undef, sub {
my ($reply, $reply_id, $timestamp) = @_;
$self->got_a_reply ($reply, $reply_id);
});
The callback can ignore the reply as an invalid packet sent to the listening port if the reply id does not match the return value from
bgsend.
$nfound = $res->poll_responses()
See if there are any "bgsend" response packets ready, and return the number of such packets delivered to their callbacks.
$res->bgabort()
Call this to release pending requests from memory, when aborting backgrounded requests, or when the scan is complete.
"Mail::SpamAssassin::PerMsgStatus::check" calls this before returning.
$packet = $res->send($name, $type, $class)
Emulates "Net::DNS::Resolver::send()".
$res->errorstring()
Little more than a stub for callers expecting this from "Net::DNS::Resolver".
If called immediately after a call to $res->send this will return "query timed out" if the $res->send DNS query timed out. Otherwise
"unknown error or no error" will be returned.
No other errors are reported.
$res->finish_socket()
Reset socket when done with it.
$res->finish()
Clean up for destruction.
perl v5.16.3 2011-06-06 Mail::SpamAssassin::DnsResolver(3)