Reputation: 11
I am trying to find all occurrences of three characters between a pair of spaces in all files in my current directory.
So far I have
sed 's/.../(&)/g'
I know it's not right; I think I'm stuck on something. How can I do that?
Upvotes: 0
Views: 172
Reputation: 521339
grep -r -l ' [a-zA-Z]{3} ' .
Explanation:
-r grep recursively from the current folder (.)
-l only display file names, rather than all matching lines
The regex I used is [a-zA-Z]{3}
, which matches three characters in between a pair of spaces, anywhere within a given file.
Upvotes: 1