Linux下查看文件内容时去掉空行和#开头的注释行

cat filename | grep ^[^#]