BASH - Files - Display uncommented lines of a file
To list only the uncommented lines of a file:
grep
-v
^
# file.conf | grep -v ^$
where:
“grep -v ^#“
means list out everything that do not start with #.
“grep -v ^$”
means list out everything that do not start with blank space.