I'm writing a script in Bash to test some code. 我正在Bash中编写脚原本测试一些代码。 However, it seems silly to run the tests if compiling the code fails in the first place, in which case I'll just abort the tests. 可是,若是编译代码首先失败,则运行测试彷佛很愚蠢,在这种状况下,我将停止测试。 app
Is there a way I can do this without wrapping the entire script inside of a while loop and using breaks? 有没有一种方法能够在不将整个脚本包装在while循环内并使用break的状况下作到这一点? Something like a dun dun dun goto? 像dun dun dun goto之类的东西? ide