Remove comment and empty lines from config files


/ Published in: Other
Save to your folder(s)

The following snippet will remove lines beginning with '#' (ignoring white space before the '#') and empty line. This helps viewing and comparing configuration files full of comments.


Copy this code and paste it in your HTML
  1. sed -e '/^[ \t]*#/d' -e '/^$/d'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.