我運行下面的Sun Solaris上(在Linux其運行正常),但不是在Sun Solaris的Solaris相當於在Linux上
name="(WORD = (TCPIP = (PROTOCOL = TCP)(WORD = ALIAS_NAME)(PORT = 10234))"
echo $name | grep -o "(WORD = (TCPIP = (PROTOCOL = TCP)(WORD = ALIAS_NAME)(PORT = 10234))"
grep: illegal option -- o
Usage: grep -hblcnsviw pattern file . . .
我的問題,其在Sun Solaris同一選項作爲選項grep -o
(匹配字符串捕獲)
利迪婭