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

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

瀏覽:961
日期:2025-04-26
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....看更多