Grep根据正则表达式包围什么样的引号而有所不同.我似乎不明白为什么会这样.这是一个问题的例子:
hamiltont$grep -e show\( test.txt variable.show(); variable.show(a); variable.show(abc,132); variableshow(); hamiltont$grep -e "show\(" test.txt grep: Unmatched ( or \( hamiltont$grep -e 'show\(' test.txt grep: Unmatched ( or \(
我只是假设有一些正确的方法用单/双引号括起正则表达式.任何帮助?
FWIW,grep -version返回grep(GNU grep)2.5.1