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

That pattern doesn't need extended regular expressions (use grep -E instead of egrep though). Also `grep -v ^#` does the same thing. `sed /^#/d` is one char shorter.


> Also `grep -v ^#` does the same thing.

Depends on what you're after. 'grep ^[^#]' also gets rid of empty lines, as they don't have a first character to match.




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

Search: