1、同时取出满足两个条件以上的行:
grep -E "^/[|type=peer|host=|^allow=" sip.conf
sip.conf内容:
[10001]
type=peer
host=dynamic
disallow=all
allow=g729
callgroup=1
操作结果:
[10001]
type=peer
host=dynamic
allow=g729
查询httpd 进程和mysqld 进程是否启动:
ps -ef |grep -E "httpd|mysqld"