删除注释行和空行

sed -e "s/#.*//g" server.properties | awk '{if (length !=0) print $0}'

原文地址:https://www.cnblogs.com/wangweiwen/p/5722782.html