Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: