On Tue, Jul 27, 2010 at 12:54 PM, Girish Venkatachalam
<girishvenkatachalam@xxxxxxxxx> wrote:
On Tue, Jul 27, 2010 at 11:42 AM, Raja Chinnathambi
<kumar.craja@xxxxxxxxxxx> wrote:
Dear friends,
The following commands can be used to view the configuration files lines
excluding comment lines.
[guest@localhost ~]$ sudo grep -v "^#\|^$" /etc/squid/squid.conf | nl
[guest@localhost ~]$ sudo sed '/^#/d;/^$/d' /etc/squid/squid.conf | nl
note : This commands will remove the comment lines begin with # and empty
lines.
If you want to remove any comment line begins that begins with any other
character add the REGEX to remove those lines.
$ grep -v '^#$' /etc/squid/squid.conf | vim -
or even
$ grep -v '^#$' /etc/squid/squid.conf | less