我如何才能从输出中获取电子邮件地址?
$ whois $IP | grep @ | head -1
notify: [email protected]
答案1
这将起作用:
$ whois 203.xxx.xxx.105 | grep @ | head -1 | cut -d" " -f2
[email protected]
这个也可以:
$ whois 203.xxx.xxx.105 | grep @ | head -1 | awk '{ print $2 }'
[email protected]