To strip the comments use this command:
That removes any line beginning with a hash mark, then deletes all empty lines and stores the result in squid-stripped.conf. I find it infinitely easier to manage a file with the just the directives.
sudo grep -v '^#' squid.conf | grep -v '^$' > squid-stripped.conf
The tilde represents the beginning of the line, and the dollar sign the end. The regular expression '^$' thus matches any empty lines.
One other useful tip if you use lots of ACLs is to put them in separate files. Here's an example:
The banned_domains.conf file has a list of names like "facebook.com". I created a directory "ACL" to keep all those files in one place.
acl banned_domains dst "/etc/squid/ACL/banned_domains.conf"
http_access deny banned_domains