Click Technology

Linux, Windows, Mac it's all good

Display a .conf file without the comments

August8

Sometimes, when you get long .conf files wit long commentaries, it’s handy just to see the actual meat in the file. Here’S how, suing grep with a simple regular expression.

grep ^[^#] /etc/thefile.conf

You can also use…

cat /etc/thefile.conf | egrep -v "^\s*(#|$)") 
posted under Linux Tips

Email will not be published

Website example

Your Comment:

This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.