snipt

Ctrl+h for KB shortcuts

Bash

recursive find in the current directory for a given string

find . -regex ".*.p.*" -and -not -regex ".*\.svn/.*"  -type f -exec grep -H someText {} \; | grep -v ignoreText
https://snippets.siftie.com/embed/ae227146d939666568ac48938c150bee/
/raw/ae227146d939666568ac48938c150bee/
ae227146d939666568ac48938c150bee
bash
Bash
1
2019-03-20T21:10:43
True
False
False
/api/public/snipt/4661/
recursive-find-in-the-current-directory-for-a-given-string
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>find . -regex <span class="s2">&quot;.*.p.*&quot;</span> -and -not -regex <span class="s2">&quot;.*\.svn/.*&quot;</span> -type f -exec grep -H someText <span class="o">{}</span> <span class="se">\;</span> <span class="p">|</span> grep -v ignoreText </span></pre></div> </td></tr></table>
find, osx