如何從輸出中只取得電子郵件地址?
$ 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]