Print file (cat) without comments and empty lines
April 16, 2020 1 Comment
$ cat /etc/postfix/main.cf | egrep -v "(^#.*|^$)"
egrep -v means leave the following out ^#.* means patterns that begin with a # | means or ^$ means patterns that are empty
or
cat /etc/postfix/main.cf | egrep -v "^\s*(#|$)"
thanks
LikeLike