Skip to content

Instantly share code, notes, and snippets.

@daleu
Last active October 8, 2020 09:48
Show Gist options
  • Save daleu/599978b0c7e729125a988b1582995a8d to your computer and use it in GitHub Desktop.
Save daleu/599978b0c7e729125a988b1582995a8d to your computer and use it in GitHub Desktop.
Counting strings on all the files in a directory
#!/usr/bin/env bash
grep -Ro "word_to_search" directory_path | wc -w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment