我刚刚注意到
grep -rni 'a2}' *
不会为所有具有字符串的文档提供匹配行。为什么会这样?a2}
我试图创建一个最小的示例,但是当我创建一个新文件并粘贴内容时,它失败了。所以我已将文件上传到Git 存储库。也许这是一个编码问题。
该文件的内容是:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{KV-Diagramme}
\label{chap:a2}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\PsTexAbbildungOhneCaption{figures/a2-1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "skript"
%%% End:
结果grep -rni 'a2}' *
是
moose@pc08 ~/Downloads/algorithms/grep $ grep -rni "a2}" *
%%% End:master: "skript"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
但我期待
moose@pc08 ~/Downloads/algorithms/grep $ grep -rni "a2}" *
\label{chap:a2}
为什么我会得到这个结果?