cat(grep) 去除空行和注释行

cat

cat /etc/zabbix/zabbix_agentd.conf|grep -Ev '^$|#'

grep

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

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

 

posted @ 2021-05-13 13:36  豆浆D  阅读(2037)  评论(0编辑  收藏  举报