Skip to content

Instantly share code, notes, and snippets.

@dusenberrymw
Last active August 24, 2017 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dusenberrymw/b3253fddb664bfd90c83fc554ea7b38e to your computer and use it in GitHub Desktop.
Save dusenberrymw/b3253fddb664bfd90c83fc554ea7b38e to your computer and use it in GitHub Desktop.
Grep Tips & Tricks

Grep Tips & Tricks

  • grep -aisElr 'search string here' ./*
    • -a -> search files as strings (this finds strings in note annotations)
    • -i -> ignore case
    • -s -> suppress errors
    • -E -> use extended regular expressions
    • -l -> only show the filename(s); remove this to see the line where the search string was found
    • -r -> search recursively
  • Use :grep for Grep searching within Vim.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment