dig

来自「EPIC IRC客户端。来源于IRCII客户端但做了很多性能和功能的优化。」· 代码 · 共 34 行

TXT
34
字号
# Contributed to the epic project by Steve Horan on April 21, 1999.## Here's a few useful functions I thought others might find useful# Find the minimum/maximum number. $min(<list>) $max(<list>)alias max {@ function_return = pop($numsort($*))}alias min {@ function_return = shift($numsort($*))}# $commasep(one,two,three) returns "one two three"# $commamake(one two three) returns "one,two,three"# Useful in opnotice scripts + other aliases.alias commasep {@ function_return = split(, $*)}alias commamake {@ function_return = tr(/ /,/$*)}# Somewhat kludge function here. This function finds the parent domain# to given host, rather than using a assumed approach# e.g. Many would view www.syd.lucid.net.au as being from the domain# lucid.net.au - when it's parent domain is in fact syd.lucid.net.au# This function has it's uses, to some more than others.# requires hop's pipe function, as well as the "dig" program.# $digdomain(squishycow.syd.lucid.net.au) returns "syd.lucid.net.au"alias digdomain {    if (isalpha($right(1 $*)))        {@ function_return = pipe(dig SOA $* | perl -lane 'print \$1 if /^([^;].*?)\\.\\s+.*SOA/')}        {@ function_return = [$*]}    }load pipe# - Wuhphy '99#   sjhoran@syd.lucid.net.au

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?