Have you grown tired of going through lines and lines of comments in a configuration file, when all you want to see is what parameters are actually set?
Are you tired of using ‘grep -v‘ to eliminate the lines you don’t want to see?
Well, this handy little alias I’ve called nocomm in your .bash_profile can help.
Somewhere in your home bash profile ~/.bash_profile, create an inbuilt function and then alias it, like this:
grep -v ^# $1 | grep -v ^$
… the alias becomes active at the next login (or immediately, if you source the file like this ‘. ~/.bash_profile‘)
The alias works by not showing any line beginning with a comment, nor any blank lines, like this:
[root@asus ~]# nocomm /etc/sysconfig/nfs