this case a configuration file, without showing any blank line, nor
any lines that started with a "#" character (commented out lines).
We can do this at the Linux command line, using sed,
if you know how to craft the regex:
sed -e '/^ *#/d' -e '/^$/d' /dir/file.conf
For further reference: https://www.gnu.org/software/sed/manual/sed.html
There are thousands of resources online: GOOGLE