Unix,Linux中的Whois命令 [英] Whois Command in Unix,Linux

查看:151
本文介绍了Unix,Linux中的Whois命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#!/bin/bash
# Does a ''whois domain−name'' lookup on any of 3 alternate servers:
# ripe.net, cw.net, radb.net
# Place this script, named ''wh'' in /usr/local/bin
# Requires symbolic links:
# ln −s /usr/local/bin/wh /usr/local/bin/wh−ripe
# ln −s /usr/local/bin/wh /usr/local/bin/wh−cw
# ln −s /usr/local/bin/wh /usr/local/bin/wh−radb
if [ −z "$1" ]
then
echo "Usage: `basename $0` [domain−name]"
exit 65
fi
case `basename $0` in
# Checks script name and calls proper server
"wh" ) whois $1@whois.ripe.net;;
"wh−ripe") whois $1@whois.ripe.net;;
"wh−radb") whois $1@whois.radb.net;;
"wh−cw" ) whois $1@whois.cw.net;;
* ) echo "Usage: `basename $0` [domain−name]";;
esac
exit 0



我是unix的新手.我一直在试图理解这个脚本.但是,有点运气的人也不能在谷歌搜索中找到运气.我想请人解释一下案例部分.
"whois $1@whois.ripe.net"
任何帮助将不胜感激
干杯
在此先感谢



Hi I very new to unix . I have been trying to understand this script . But dint find any luck understanding nor in googling. I want some one to explain me the case part.
"whois $1@whois.ripe.net"
any help wil be appreciated
Cheers
Thanks in advance

推荐答案

1] 然后 echo用法:`basename
1" ] then echo "Usage: `basename


0` [域名]" 65号出口 科幻 case'basename
0` [domain−name]" exit 65 fi case `basename


0`在 #检查脚本名称并调用适当的服务器 "wh")whois
0` in # Checks script name and calls proper server "wh" ) whois


这篇关于Unix,Linux中的Whois命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆