This is because as long as the connection is successful, the last exit status will be zero.
这是因为只要连接成功,最后的退出状态码就是零。
If you want to catch the iguana, close up the five exits from the mound, and wait for it to come out from the last exit.
如果你想捉住这只蜥蜴,你要堵上土堆的五个出口,然后等待它从最后一个出口爬出。
Notice that when you run the command, the if statement for the last exit status is never reached because the script exits upon a non-zero return status of the cp command.
注意,当您运行该命令时,实现最终的退出状态的if语句将永远无法满足条件,因为脚本在遇到cp命令的非零返回状态时将退出。
应用推荐