Grep vs Nirw Search
When comparing Grep vs Nirw Search, the Slant community recommends Grep for most people. In the question“What are the best open source tools for searching source code?” Grep is ranked 3rd while Nirw Search is ranked 11th.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Preinstalled on every Unix like system
Pro Searches any text file
Pro Reads from STDIN
You can search the output of any command just by piping into grep
.
Pro Searches multiple files
It is possible to instruct grep to search through multiple files specified on the command line or entire directory trees.
Pro Full PCRE regex support
Pro Fast
Searches through large collections of files well before the expected time.
Pro Progress Output
By default, display the file being searched.
Pro Optional multi-line support
Pro Color highlight matches
Pro Tab completion
The command-line for refining a search supports auto-completing based on the current output.
Pro Can refine the initial search
Initial search can be refined by typing in other terms (optionally exclude from results too).
Pro Optional regex or literal text searches
While regex is default, sometimes escaping is inconvenient, in these cases you can perform literal searches.
Cons
Con Hard to filter by file type
Want to search for my_function in PHP files only? find . -name '*.php' -exec grep my_function '{}' ;
Con Multiple, not fully compatible, implementations
The most known 2 are: BSD and GNU implementations which slightly differ in their capabilities and performance.