如何获取包含带引号的字符串的文件列表(使用 grep 命令)

How to get list of files which include string with quotes (using grep command)

我在 Unix 环境中丢失了 xml,我想获取包含下一个字符串的文件列表: 值值="99.00"

我的问题是这个字符串包含引号,这导致我无法使用 grep 命令。知道我应该使用哪个命令吗?

SHELL=/bin/ksh

使用反斜杠转义 ":

grep Value\ value=\"99.00\" *.xml

或用单引号括起来:

grep 'Value value="99.00"' *.xml