Hi,
I wanted to cut a specific portion from given string. How would I do that?
Example:
/u09/core/inbound/abc.txt is my string.
I want abc.txt in a variable.
Please help me.
Regards,
Dhaval (3 Replies)
Hi,
I am trying to execute a command like this:
find ./ -name "*.gz" -exec sh -c 'zcat {} | awk -f parse.awk' \; >> output
If I want to print the filename, i generally use the -print argument to the find command but when I am redirecting the output to a file, how can I print just the... (2 Replies)
HI Guys,
I need some expert help.. i have this below data as input
WHERE StartTime >= '2010-03-24 20:10:08'
AND username in('abc_xxx_yyy_01')
and output need is
just
in
appreciate your help on this !!!!
thanks you ... (8 Replies)
Hi All,
I am trying to write a small shell programming to get db2 database size info. The command I am going to use is- db2 "CALL GET_DBSIZE_INFO(?, ?, ?, -1)"
and the output of above command generally is-
Value of output parameters
--------------------------
Parameter Name :... (4 Replies)
Hi,
I have a tab-delimited txt file as below. It is part of the original file.
I want to cut the lines starting with "3" in column1 and paste them before the lines starting with "1" in column 1. So I will get
Anyone knows any simple shell scripts to do that? The original file is... (5 Replies)
I have a file that contain the following.
-D HTTPD_ROOT="/usr/local/apache"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
I want a shell script, so that after cat filename and apply the shell script I should get the output as follows.
/usr/local/apache/conf/httpd.conf
ie
cat filename |... (7 Replies)
Hi,
I am new to scripting and need help in cutting strings from output of a command. For exapmle in am getting the following as the out out from the command i run:
Out Condition: Askajdsdfa | date: 1204 | oper: +
I need to get the output as Askajdsdfa and 1204.
Thanks (3 Replies)
Running this code
df -h | head -2 | awk '{print $8}'
Gives me the following output:
%iused
6%
What I'm trying to do is get the 6% but I'm having trouble doing this using cut -c, I think that this could be because the text is on different lines; is there a way of doing this? (8 Replies)
Hi,
On AIX 7
I have :
grep 's_ohs_instance_loc' $CONTEXT_FILE
<ohs_instance_loc oa_var="s_ohs_instance_loc">/u01/appl_top/env/fs1/FMW_Home/webtier/instances/EBS_web_env_OHS1</ohs_instance_loc>
But I need only this part:... (4 Replies)
Discussion started by: big123456
4 Replies
LEARN ABOUT SUSE
mail::spf::util
Mail::SPF::Util(3) User Contributed Perl Documentation Mail::SPF::Util(3)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
);
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.
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.12.1 2010-07-05 Mail::SPF::Util(3)