Shell - grep stderr output
作者:互联网
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,home,scnzzh,WARNING,inventory,zzh,output 来源: https://www.cnblogs.com/zhangzhihui/p/14069326.html