Escaping grep
"Michael F. Stemper" <[email protected]> Sun, 21 Feb 2021 15:35:55 -0600
| Newsgroups | alt.comp.lang.shell.unix.bourne-bash |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
I wanted to see which LaTeX packages I was using for a particular
project, so I did:
user@host$ grep -h "\\usep" *tex | sort | uniq
% \usepackage{array} % for math mode columns in tabular
% \usepackage{graphicx}
% \usepackage{longtable}
% \usepackage{mathrsfs} % for mathscr
% \usepackage{tikz-cd} % for commutative diagrams
\usepackage{amsmath} % for implication and align*
\usepackage{amssymb} % for black-board set names
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{parskip}
user@host$
However, that showed unused packages as well. So I tried
anchoring my grep to the beginning of the line, and got:
user@host$ grep -h "^\\usep" *tex | sort | uniq
user@host$
Why isn't this working? What am I overlooking? How
should I have said it?
--
Michael F. Stemper
The name of the story is "A Sound of Thunder".
It was written by Ray Bradbury. You're welcome.