Home > Unix >

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

KategorienUnix
  1. Bisher keine Kommentare
  1. Bisher keine Trackbacks