請問怎麼抓[]中的字串 - Linux

Table of Contents


我有一個檔案裡面長得像這樣

[abc]
wzbird
ptt
IBM
[google]
124
bbbbbb
aaaaaa

請問要怎麼用像grep這樣的指令抓[]中的字串呢?

就是我的輸出需要是

abc
google

我試了一下grep遇到符號好像不行
謝謝

--

All Comments

Carol avatarCarol2010-09-20
我找到了,是用 [] 把符號包起來