Click Technology

Linux, Windows, Mac it's all good

Long story short

October26

I was trying to configure a FreeRADIUS server and, as is the tendency in Linux, devs confuse documentation for configuration. I’d much prefer a .conf file without the entire documentation embedded in it.. I’d rather a README in the root, a /docs or a man file instead.

Anyhoo, how to remove all the garbage and just get the .conf file commands only?

$ sed '/^$/d; /#/d' radiusd.conf.original > radiusd.conf

This removes all blank lines and all lines beginning with ‘#’ and now you have a nice compact .conf file. File goes from ~27k to 1.3k.

Leonardo Di Caprio in "The wolf of Wall Street"

Noice.

posted under Linux Tips

Comments are closed.

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