Bash: counting number of times substring is found in directory
A simple grep can help you recursively search for a substring in all the files of a directory. Here is an example of looking for multi-doc yaml files: # recursively search directory, looking for line ‘—‘ # regex: caret means line starts with, dollar sign mean line ends with grep -sr ‘^—$’ If you have … Bash: counting number of times substring is found in directory