是否有一个"转到"在bash声明? [英] Is there a "goto" statement in bash?

查看:157
本文介绍了是否有一个"转到"在bash声明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有在bash的转到语句?我知道,它被认为是不好的做法,但我需要明确转到。

Is there a "goto" statement in bash ? I know It is considered bad practice, but I need specifically "goto".

推荐答案

没有,没有,看到和教派;在击参考手册 有关的的存在信息。特别要注意的提继续,这是不为灵活转到,但在击比某些语言更加灵活,并且可以帮助你实现你想要的。 (不管它是什么,你想。)

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆