bash – diff的错误退出值是什么?

前端之家收集整理的这篇文章主要介绍了bash – diff的错误退出值是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在diff手册页上,我找到了这些退出值:
0     No differences were found. 
    1     Differences were found.
   >1     An error occurred.

对于不同的错误,是否有不同的出口值高于1?

这取决于你的diff命令。 Mine(GNU diffutils 3.0)说:

An exit status of 0 means no differences were found,1 means some
differences were found,and 2 means trouble. Normally,differing
binary files count as trouble,but this can be altered by using the
-a or --text option,or the -q or --brief option.

原文链接:https://www.f2er.com/bash/390499.html

猜你在找的Bash相关文章