bash - How to conditionally do something if a command succeeded ...

bash - How to conditionally do something if a command succeeded ...

瀏覽:410
日期:2025-09-29
16 Oct 2011 ... How can I do something like this in bash? ... But if you want to test whether a command succeeded or not, use the command ... then echo success else echo failed fi if [ $RESULT == 0 ]; then echo success 2 else echo failed 2 fi ....看更多