< Concord
Content added Content deleted
No edit summary |
imported>mutante m (despam) |
||
Line 1: | Line 1: | ||
this is a nice basic script that uses oracle's sql to get the element names that have a matching IP address. |
|||
[http://www.excce.com 中国涂装设备网][http://www.hzn.cn/web/ 网站建设�?�州][http://www.hzn.cn/domain/ �?�州域�??注册][http://www.hzn.cn/email/ �?�州�?业邮局][http://www.hzn.cn/tj/ �?�州网站网络推广][http://www.51122.com/coating/ 涂装] |
|||
[http://www.51122.com 世纪网�?�之家] |
|||
[http://go.excce.com 网站建设] |
|||
[http://www.uusky.com 世纪情感] |
|||
[http://www.uusky.org �?�州网络公�?�] |
|||
[http://www.uusky.net �?�州喷塑加工] |
|||
[http://www.hzn.cn �?�州网站建设] |
|||
[http://www.hzn.cn �?�州网络公�?�] |
|||
[http://www.uusky.com/ 情感] |
|||
[http://www.uusky.org �?�州网站建设] |
|||
[http://www.znpp.com �?�州网站建设] |
|||
*<pre># more getNamefromIP.pl |
|||
[http://uusky.zj.com �?�州网站建设] |
|||
#!/bin/perl |
|||
[http://sdxx.zj.com �?�州网络公�?�] |
|||
use strict; |
|||
[http://www.loveday.somee.com/ GOOGLE排�??] |
|||
use warnings; |
|||
[http://www.cnzjqi.somee.com 网站建设] |
|||
#simple script that outputs the names of elements that have an IPaddress given as and argument |
|||
[http://www.uusky.com/host 网站建设] |
|||
# usage 'getNamefromIP.pl x.x.x.x' |
|||
[http://www.uusky.com/webpage/ 网站建设] |
|||
[http://www.uusky.com/inf/ 网站建设] |
|||
[http://www.hzjl365.com/inc/ 网站建设] |
|||
[http://xnan2.91x.net/ 网站建设] |
|||
[http://www.xinyifang.net/inf/ 网站建设] |
|||
[http://web.uusky.org/ 网站建设] |
|||
[http://www.pagerealm.com/agent2732/ 网站建设] |
|||
[http://www.pcpages.com/uusky/ 网站建设] |
|||
[http://www.coolgoose.com/sites/xnane/ 网站建设] |
|||
[http://www.coolgoose.com/sites/xnane/web/ 网站建设] |
|||
[http://www.coolgoose.com/sites/xnane/company/ 网络公�?�] |
|||
[http://www.znpp.com/google/ 网络公�?�] |
|||
[http://uusky.zj.com/company/ 网络公�?�] |
|||
[http://uusky.zj.com/web/ 网络公�?�] |
|||
[http://www.blogcn.com/user20/xnan2 网站建设] |
|||
[http://xnan2.blogdriver.com/xnan2/ 网站建设] |
|||
[http://www.loveday.epsystem.net 网站建设] |
|||
my $oraUser="user name here"; |
|||
[http://diary.51122.com �?费申请个人日记] |
|||
my $oraPassword="password here"; |
|||
[http://gb.51122.com �?费申请留言本] |
|||
my $oraPath="path to sqlplus command here"; # eg "/oracle/bin" |
|||
[http://www.51122.com/website/ �?�州网页设计] |
|||
my $ipAddress=$ARGV[0] || die "Missing args $!"; # get ipAddress |
|||
[http://www.excce.com/website/ �?�州网站设计] |
|||
my %elements = qx{$oraPath/sqlplus -S $oraUser/$oraPassword <<EOF |
|||
set head off |
|||
SELECT NAME from NH_ELEMENT where IP_ADDRESS='$ipAddress'; |
|||
exit |
|||
EOF }; |
|||
foreach (%elements) { |
|||
next if /^ |
|||
/; |
|||
next if /rows selected.$/; |
|||
print $_; |
|||
}</pre> |
Revision as of 06:33, 13 January 2005
this is a nice basic script that uses oracle's sql to get the element names that have a matching IP address.
# more getNamefromIP.pl
- !/bin/perl
use strict; use warnings;
- simple script that outputs the names of elements that have an IPaddress given as and argument
- usage 'getNamefromIP.pl x.x.x.x'
my $oraUser="user name here";
my $oraPassword="password here";
my $oraPath="path to sqlplus command here"; # eg "/oracle/bin"
my $ipAddress=$ARGV[0] || die "Missing args $!"; # get ipAddress
my %elements = qx{$oraPath/sqlplus -S $oraUser/$oraPassword <<EOF set head off SELECT NAME from NH_ELEMENT where IP_ADDRESS='$ipAddress'; exit EOF };
foreach (%elements) {
next if /^
/;
next if /rows selected.$/; print $_;
}