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

Generally speaking, matching regexpes using perl instead of grep is often a win :

    perl -p -e 'm/regexp/' somefile


That will print the whole file regardless, I think you meant:

       perl -ne 'print if /regex/' file


Indeed :) Sorry for the mishap.




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

Search: