3 ms·
So: $ grep ^ERROR | wc
by ColinWright 11y ago
So:
$ grep ^ERROR | wc
- wtetzner 11y ago$ grep ^ERROR | wc -l
- ColinWright 11y agoAbsolutely. I noticed that soon after I typed the other, but decided to leave it. Usually I'm passing the results to something else so it doesn't matter, but you're right, that produces just the number we want.
- zimpenfish 11y agoOr if you want to avoid a useless use of wc - $ grep -c ^ERROR
- ColinWright 11y agoHah! I'd completely forgotten about "-c". Thank you!