什么是差异错误退出值? [英] What are the error exit values for diff?

查看:92
本文介绍了什么是差异错误退出值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

差异手册页,我发现这些出口值:

On the diff man-page I've found these exit values:

    0     No differences were found. 
    1     Differences were found.
   >1     An error occurred.

是否有上述1不同的退出值不同的错误?

Are there different exit values above 1 for different errors?

推荐答案

这取决于你的差异命令。矿(GNU diffutils的3.0)说:

It depends on your diff command. Mine (GNU diffutils 3.0) says:

0 的退出状态都表示没有发现差异, 1 表示一些
  差异被发现,而 2 意味着麻烦。通常情况下,不同的
  二进制文件算作麻烦,但是这可以通过使用改变
   -a - 文本选项,或 -q - 简短选项

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.

这篇关于什么是差异错误退出值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆