Search for a regular expression in files matching a glob (e.g. README.*)

rg

  • Ripgrep is a recursive line-oriented CLI search tool.
    Aims to be a faster alternative to `grep`.
    More information: <https://github.com/BurntSushi/ripgrep>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

rg {{regular_expression}} --glob {{glob}}

click the source code to copy install rg on any operating system with command-not-found.com