3 ms·
If your grep has -P, then you could do all in one go with lookahead assertions... grep -P '(?=.*pattern1)(?=.*pattern2)(?!.*exclude_these)' **/* Maybe no
by montroser 5y ago
If your grep has -P, then you could do all in one go with lookahead assertions...
grep -P '(?=.*pattern1)(?=.*pattern2)(?!.*exclude_these)' **/*
Maybe not the most beautiful or easy to have at the fingertips, but could be worse.