HOWTO Trim comments and spaces from files

November 5, 2013

Trim comments and spaces from a file:

$ grep ^[^#] file

“The regex ^[^#] matches the first character of any line, as long as that character that is not a #. Because blank lines don’t have a first character they’re not matched either, resulting in a nice compact output of just the active configuration lines.”

Via David Berner

The Next Move Is Yours

Stop Guessing. Start Leading.

Make your next IT decision the right one.