經安全檢測,此網站為安全網站,請放心前往原始網址!

linux - How to exit if a command failed? - Stack Overflow

I want to print a message and exit my script if a command fails. ... and || in scripts work based on success not on the return value. ... This can just be replaced by if my_command, there is no need to use the test command here.

stackoverflow.com

網址安全性掃描由 google 提供