首页 > 系统服务 > 详细

Shell - grep stderr output

时间:2020-12-01 18:13:59      阅读:43      评论:0      收藏:0      [点我收藏+]
scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts | grep WARNING | wc -l
[WARNING]:  * Failed to parse /home/scnzzh/zzh-inventory with yaml plugin: Syntax Error while loading YAML.   did not find expected <document start>  The error
appears to be in /home/scnzzh/zzh-inventory: line 2, column 1, but may be elsewhere in the file depending on the exact syntax problem.  The offending line appears
to be:  [zservers] zubt ^ here
[WARNING]:  * Failed to parse /home/scnzzh/zzh-inventory with ini plugin: host range must have begin <= end
[WARNING]: Unable to parse /home/scnzzh/zzh-inventory as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match all
0
scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts 2>&1 | grep WARNING | wc -l
5

 

Shell - grep stderr output

原文:https://www.cnblogs.com/zhangzhihui/p/14069326.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!