Use the && control operator to combine two commands so that the second is run only if the first command returns a zero exit status.
使用 && 控制操作符来组合两个命令,以便仅当 第一个命令返回零退出状态时才运行第二个命令。
Why? Recall that the operator * can match zero or more times.
为什么? 回想一下操作符 * 可以匹配零次或多次。
Similarly, the || control operator separates two commands and runs the second command only if the first command returns a non-zero exit status.
类似地,|| 控制操作符分隔两个命令,并且仅当第一个命令返回非零退出状态时才运行第二个命令。
Just take a look: if this is 9, 5 divided by 9 is always going to be 0 point something, and if you thus have two integers and you're rounding down, which is what happens when you do integral math we're using this operator, I'm going to get zero times whatever.
稍微看一看:如果这是9,5除以9会得到,0点几,如果你用两个整型数,你舍去小数,这就是当你们,用整型数使用这个操作的所发生的事情,我将得到数值0乘以任何一个数字。
应用推荐