是否有“转到"?bash 中的语句? [英] Is there a "goto" statement in bash?
本文介绍了是否有“转到"?bash 中的语句?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
bash 中是否有goto"语句?我知道这被认为是不好的做法,但我需要专门转到".
Is there a "goto" statement in bash ? I know It is considered bad practice, but I need specifically "goto".
推荐答案
不,没有;请参阅中的§3.2.4复合命令"Bash 参考手册 了解关于确实存在的控制结构的信息.特别要注意 break
和 continue
的提及,它们不如 goto
灵活,但在 Bash 中比在某些语言,并可以帮助您实现您想要的.(不管你想要什么......)
No, there is not; see §3.2.4 "Compound Commands" in the Bash Reference Manual for information about the control structures that do exist. In particular, note the mention of break
and continue
, which aren't as flexible as goto
, but are more flexible in Bash than in some languages, and may help you achieve what you want. (Whatever it is that you want . . .)
这篇关于是否有“转到"?bash 中的语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文