DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Dave has posted 5 posts at DZone. View Full User Profile

Grep For String And Show Results With Matches > 0

02.02.2009
| 3815 views |
  • submit to reddit
        
grep -ric "search-string" . | awk -F ":" '$2 > 0 { print $0 }'