cat /etc/zabbix/zabbix_agentd.conf |grep -v "^#" |grep -v ^$

^#代表已#开头
^$代表空行