亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区
Chinaunix
標(biāo)題:
grep匹配問題
[打印本頁]
作者:
askandstudy
時(shí)間:
2012-03-03 18:49
標(biāo)題:
grep匹配問題
[user1@RHEL6A temp]$ grep -E '10{3}' services
cadlock2 1000/tcp #
cadlock2 1000/udp #
ndmp 10000/tcp # Network Data Management Protocol
ndmp 10000/udp # Network Data Management Protocol
scp-config 10001/tcp # SCP Configuration Port
scp-config 10001/udp # SCP Configuration Port
documentum 10002/tcp # EMC-Documentum Content Server Product
documentum 10002/udp # EMC-Documentum Content Server Product
documentum_s 10003/tcp # EMC-Documentum Content Server Product
documentum_s 10003/udp # EMC-Documentum Content Server Product
emcrmirccd 10004/tcp # EMC Replication Manager Client
emcrmird 10005/tcp # EMC Replication Manager Server
mvs-capacity 10007/tcp # MVS Capacity
mvs-capacity 10007/udp # MVS Capacity
octopus 10008/tcp # Octopus Multiplexer
octopus 10008/udp # Octopus Multiplexer
swdtp-sv 10009/tcp # Systemwalker Desktop Patrol
swdtp-sv 10009/udp # Systemwalker Desktop Patrol
irisa 11000/tcp # IRISA
irisa 11000/udp # IRISA
irtrans 21000/tcp # IRTrans Control
irtrans 21000/udp # IRTrans Control
復(fù)制代碼
比如上面這樣,我想只匹配出現(xiàn)3個(gè)0,而不要連續(xù)2個(gè)0或大于3個(gè)0的怎么寫的?
作者:
mpstat
時(shí)間:
2012-03-03 18:58
grep -P '10{3}(?!=0)'
作者:
askandstudy
時(shí)間:
2012-03-03 19:11
厲害,怎么正則表達(dá)式還分perl正則表達(dá)式的,還以為是統(tǒng)一的,還得再找點(diǎn)資料學(xué)習(xí)學(xué)習(xí),謝謝!
作者:
ziyunfei
時(shí)間:
2012-03-03 19:12
'[^0]000[^0]'
作者:
askandstudy
時(shí)間:
2012-03-03 19:24
樓上的也可以,謝謝
[user1@RHEL6A temp]$ grep -E '1000[^0]' services
作者:
mpstat
時(shí)間:
2012-03-03 19:41
回復(fù)
4#
ziyunfei
這個(gè)如果是1000后面啥都沒有是不是匹配不了了
作者:
zooyo
時(shí)間:
2012-03-03 21:02
提示:
作者被禁止或刪除 內(nèi)容自動屏蔽
歡迎光臨 Chinaunix (http://www.72891.cn/)
Powered by Discuz! X3.2