On Tue, Jul 27, 2010 at 12:54 PM, Girish Venkatachalam <girishvenkatacha...@gmail.com> wrote: > On Tue, Jul 27, 2010 at 11:42 AM, Raja Chinnathambi > <kumar.cr...@yahoo.co.in> wrote: >> Dear friends, >> >> The following commands can be used to view the configuration files lines >> excluding comment lines. >> >> [gu...@localhost ~]$ sudo grep -v "^#\|^$" /etc/squid/squid.conf | nl >> >> [gu...@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 >
Sorry I was too fast. My stuff will not remove empty lines. But you don't need sudo. This is pretty good as it is. -Girish _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc