I'm trying to clean up a file I created with this little batch script.
I have more results with names of servers found and not found.
Host 1.1.11.10.in-addr.arpa. not found: 3 (NXDOMAIN)
Host 2.1.11.10.in-addr.arpa. not found: 3 (NXDOMAIN)
I'm doing a nameserver2.txt grep | grep name which displays only existing servers. Except that I have too much information on each line
5.1.11.10.in-addr.arpa domain name pointer serv1.domain.com
6.1.11.10.in-addr.arpa domain name pointer serv2.domain.com
I would like to have only the 1st character each line (so the last of each IP and the name of the server
I'm making a
but in this case I only have information on two so in the end I made this order:
I am trying to cat a file and then grep that file for a number. I can do it fine on other files but this particular file will not do anything. I tried running it on an older file from the same device but it is just not working. The file is nothing more than a flat file on a unix box. Here is just a... (3 Replies)
Hi,
This is what I am trying to do.
1) connect to 3 remote servers from my local machine
serverA serverB serverC
2) read error file from each server
cat /var/lib/mysql/mydb.err
3) grep for lines displaying "yesterday" date
grep "`date +%y%m%d' '-d\"1 day ago\"`"
4) Append those lines to a... (7 Replies)
Hi,
Im a pretty large noob to linux/perl etc and im trying to use mysql slurp to take a delimited file and import it into mysql using stdin (in the hope its faster)
mysqlslurp - slurp <STDIN> into a MySQL table - search.cpan.org
Christopher Brown / MySQL-Slurp - search.cpan.org
Using... (3 Replies)
Hi All,
I'd like to do this
cat /etc/passwd
and grep -v on the /etc/shells list
I'd like to find all shell that doesn't exist on the /etc/passwd.
Is there an easy way without doing a egrep -v "/bin/sh|/bin/bash................"?
How do I use a file /etc/shells as my list for... (4 Replies)
I am not sure if using cat -n is the most efficient way to split a file into multiple files, one file per line in the source file.
I thought using cat -n would make it easy to process the file because it produces an output that numbers each line that I could then grep for with the regex "^ *$i".... (3 Replies)
Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format. (3 Replies)
not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell.
but how must the command be?
grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d
the delimeter is just a space. can you help meplease. :D (1 Reply)
Hello,
i need to search one word (snp1) from many files and copy the content of the columns of this word in new file.
example:
file 1:
SNP BP CHR P
snp1 1 3 0.01
snp2 2 2 0.05
.
.
file 2:
SNP BP CHR P
snp1 1 3 0.06
snp2 2 2 0.3
output... (6 Replies)
Hello
someone told me to use
OS=`awk '{print int($3)}' < /etc/redhat-release`
instead of
OS=cat /etc/redhat-release | `awk '{print int($3)}'`
any idea for the reason ? (5 Replies)
Hi Guys
This is my first post so I am not sure how things go here. I'm sorry if I'm breaking the rule or something. Feel free to correct me about that :)
So as I was saying...
I'd been trying to grep this folder containing 900,000 txt files but seems no luck. I get either "No such file... (6 Replies)
Discussion started by: Nexeu
6 Replies
LEARN ABOUT DEBIAN
mail::spf::util
Mail::SPF::Util(3pm) User Contributed Perl Documentation Mail::SPF::Util(3pm)NAME
Mail::SPF::Util - Mail::SPF utility class
SYNOPSIS
use Mail::SPF::Util;
$hostname = Mail::SPF::Util->hostname;
$ipv6_address_v4mapped =
Mail::SPF::Util->ipv4_address_to_ipv6($ipv4_address);
$ipv4_address =
Mail::SPF::Util->ipv6_address_to_ipv4($ipv6_address_v4mapped);
$is_v4mapped =
Mail::SPF::Util->ipv6_address_is_ipv4_mapped($ipv6_address);
$ip_address_string = Mail::SPF::Util->ip_address_to_string($ip_address);
$reverse_name = Mail::SPF::Util->ip_address_reverse($ip_address);
$validated_domain = Mail::SPF::Util->valid_domain_for_ip_address(
$spf_server, $request,
$ip_address, $domain,
$find_best_match, # defaults to false
$accept_any_domain # defaults to false
);
$sanitized_string = Mail::SPF::Util->sanitize_string($string);
DESCRIPTION
Mail::SPF::Util is Mail::SPF's utility class.
Class methods
The following class methods are provided:
hostname: returns string
Returns the fully qualified domain name (FQDN) of the local host.
ipv4_address_to_ipv6($ipv4_address): returns NetAddr::IP; throws Mail::SPF::EInvalidOptionValue
Converts the specified NetAddr::IP IPv4 address into an IPv4-mapped IPv6 address. Throws a Mail::SPF::EInvalidOptionValue exception if
the specified IP address is not an IPv4 address.
ipv6_address_to_ipv4($ipv6_address): returns NetAddr::IP; throws Mail::SPF::EInvalidOptionValue
Converts the specified NetAddr::IP IPv4-mapped IPv6 address into a proper IPv4 address. Throws a Mail::SPF::EInvalidOptionValue
exception if the specified IP address is not an IPv4-mapped IPv6 address.
ipv6_address_is_ipv4_mapped($ipv6_address): returns boolean
Returns true if the specified NetAddr::IP IPv6 address is an IPv4-mapped address, false otherwise.
ip_address_to_string($ip_address): returns string; throws Mail::SPF::EInvalidOptionValue
Returns the given NetAddr::IP IPv4 or IPv6 address compactly formatted as a string. For IPv4 addresses, this is equivalent to calling
NetAddr::IP's "addr" method. For IPv6 addresses, this is equivalent to calling NetAddr::IP's "short" method. Throws a
Mail::SPF::EInvalidOptionValue exception if the specified object is not a NetAddr::IP IPv4 or IPv6 address object.
ip_address_reverse($ip_address): returns string; throws Mail::SPF::EInvalidOptionValue
Returns the "in-addr.arpa."/"ip6.arpa." reverse notation of the given NetAddr::IP IPv4 or IPv6 address. Throws a
Mail::SPF::EInvalidOptionValue exception if the specified object is not a NetAddr::IP IPv4 or IPv6 address object.
valid_domain_for_ip_address($server, $request, $ip_address, $domain, $find_best_match = false, $accept_any_domain = false): returns string
or undef
Finds a valid domain name for the given NetAddr::IP IP address that matches the given domain or a sub-domain thereof. A domain name is
valid for the given IP address if the IP address reverse-maps to that domain name in DNS, and the domain name in turn forward-maps to
the IP address. Uses the given Mail::SPF::Server and Mail::SPF::Request objects to perform DNS look-ups. Returns the validated domain
name.
If $find_best_match is true, the one domain name is selected that best matches the given domain name, preferring direct matches over
sub-domain matches. Defaults to false.
If $accept_any_domain is true, any domain names are considered acceptable, even if they differ completely from the given domain name
(which is then effectively unused unless a best match is requested). Defaults to false.
sanitize_string($string): returns string or undef
Replaces all non-printable or non-ascii characters in a string with their hex-escaped representation (e.g., "x00").
SEE ALSO
Mail::SPF
For availability, support, and license information, see the README file included with Mail::SPF.
AUTHORS
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org>
perl v5.14.2 2012-01-30 Mail::SPF::Util(3pm)