Print (samba) configuration without comments or empty lines with grep and regex
grep -v -E '(^#|^;|^$)' /etc/samba/smb.conf This line will print the smb.conf without comments (lines beginning with ; or #) and empty lines. The negation comes along with the grep paramter "-v"