yeale 发表于 2008-1-14 15:36:04

grep时[^]的用法?

有的时候看到grep时,带有这个符号。
如:ls -al | grep [^*]

coding3125 发表于 2008-1-14 16:24:56

^表示行首啊

搜索行首为"word"的那一行:
grep -n '^word' myfile,txt

yeale 发表于 2008-1-17 11:53:31

谢谢。
:-D

candycuckoo 发表于 2008-2-19 09:53:15

grep [^*]表示取空行吧
页: [1]
查看完整版本: grep时[^]的用法?