System administration tasks need managing configuration files for applications and services. I usually remove the comment lines in the output to see only effective ones.
# grep -Ev '^[[:blank:]]*#.*|^[[:blank:]]*$' </path/to/the/config/file>
It would be helpful to create an alias to avoid writing that complicated regular expression every time.
# alias clear-comments="grep -Ev '^[[:blank:]]*#.*|^[[:blank:]]*$'"
then you can use it like this;
# clear-comments /etc/rsyslog.conf
Comments
Post a Comment