grep -ve '^#' -ve '^$' squid.conf
The -v flag negates the search and the -e flag uses a regex to do the search. I just happened to have used just two regexes on this particular line, but feel free to use as many as you need on your file.
I found this line to be very useful as I'm working with config files all day and sometimes, mostly when I actually know what I'm doing and don't need any references, I want those config files to be cleaned up to be easier on the eyes ;-)
Carlos