### [`ripgrep`][1]

Use `ripgrep` with its `--passthru` parameter:

 rg --passthru pattern file.txt

It's one of the [fastest grepping tools][2], since it's built on top of [Rust's regex engine][3] which uses finite automata, SIMD and aggressive literal optimizations to make searching very fast.

> `--passthru` - Print both matching and non-matching lines.
>
> Another way to achieve a similar effect is by modifying your pattern to match the empty string. For example, if you are searching using `rg foo` then using `rg "^|foo"` instead will emit every line in every file searched, but only occurrences of foo will be highlighted. This flag enables the same behavior without needing to modify the pattern.


 [1]: https://github.com/BurntSushi/ripgrep
 [2]: http://blog.burntsushi.net/ripgrep/
 [3]: https://github.com/rust-lang-nursery/regex