Should have done this a while ago…
Added to .bash_aliases the following
alias confgrep='egrep -v "^$|^#"'
I find myself too often going through massive config files and only wanting to see what is actually in the config, instead of weeding through a massive amount of whitespace and commented out documentation. I think squid.conf is probably the worst offender of this and the default snmpd.conf has a good amount of spew in it as well. Literally all of squids documentation is located in it’s configuration file, while it is somewhat useful, it’s usually just means a bigger PITA to find what you are looking for.
Inline Search and Replace
I was going through some old code tonight from college that had my student id(SS #) in it and I wanted to strip out my SS # from it. I run into this situation a lot where I need to do a mass inline search and replace. I hope this command is useful to anyone else
find . -type f -exec sed -i 's/MyIdentity//' {} \;