I'm looking for some pattern in my project, and it's been repeated too much in some files.. How can I tell grep to show only once each file?
I'm using:
grep -R "my_pattern" *
You could do this, it will make grep only print the first match:
grep -m 1 -R "pattern" *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With