如何sed
打印文件之间\begin{mcstas}
和\end{mcstas}
文件中的所有大写单词foo.tex
?
以下示例包含 foo.tex 的最小示例:
\begin{mcstas}
DEFINE COMPONENT child_name COPY parent_name
SETTING PARAMETERS (newpar1, newpar2)
INITIALIZE COPY parent_name EXTEND
SAVE
\end{mcstas}
foo FALSE POSITIVE
\begin{mcstas}
DEFINE COMPONENT name ...
\end{mcstas}