Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过文件 gdb.txt 搜索以下汇编表达式:
call DWORD PTR [EDI]
但做
grep -e "call DWORD PTR [EDI]" -f gdb.txt
不返回任何东西。想法?
您需要转义左括号,这是一个特殊的正则表达式字符。此外, -f 选项不会像您认为的那样做。您只需要在模式之后指定您的文件。此外,您甚至不需要-e。所以归结为:
grep "call DWORD PTR \[EDI]" gdb.txt