Bash 我怎样才能得到回执呢?

Bash 我怎样才能得到回执呢?,bash,find,grep,backticks,Bash,Find,Grep,Backticks,因此,我试图在文件中查找反勾号(`),因此我运行: grep -irl '\`' ./* 这似乎会返回每个可能的文件 我还能试什么呢?随你的便,它对我很管用 grep -ri \` * 或 我向各位道歉,您必须使用-I忽略二进制文件。这些是正在返回的文件。直到我删除了-l,我才意识到这一点,这表明结果本质上是二进制的 grep -rlI '`' ./* 从手册页: -I Process a binary file as if it did not contain match

因此,我试图在文件中查找反勾号(`),因此我运行:

grep -irl '\`' ./*
这似乎会返回每个可能的文件


我还能试什么呢?

随你的便,它对我很管用

grep -ri \` *


我向各位道歉,您必须使用
-I
忽略二进制文件。这些是正在返回的文件。直到我删除了
-l
,我才意识到这一点,这表明结果本质上是二进制的

grep -rlI '`' ./*
从手册页:

   -I     Process a binary file as if it did not contain  matching  data;
          this is equivalent to the --binary-files=without-match option.

如果您实际上不需要匹配backtick本身,但希望匹配backtick所包含的内容(例如,自动生成的MySQL表名),那么单字符通配符(“)也会起作用

我今天就这样使用它:

grep "INSERT INTO .my_table." sqldump.sql

金顶;我在找这个案子。
   -I     Process a binary file as if it did not contain  matching  data;
          this is equivalent to the --binary-files=without-match option.
grep "INSERT INTO .my_table." sqldump.sql