bash的跳转有关问题

bash的跳转问题
请各位帮忙:
请问怎麽样在bash里面实现跳转问题?个人感觉bash里面没有goto的语法.
例如:
        if   [   -f   test.txt   ];then
              go   to   shell_end
        fi
        .
        .
        其它的处理
        .
        .
        shell_end{
        处理
        }


bash没有goto,可以用csh:

#!/bin/csh

goto test
echo "1 "
test:
echo "2 "

不过建议不要用goto,不管是什么语言。你这种情况不妨用函数来包含错误处理代码,在goto的地方调用函数。

bash的跳转有关问题

相关文章:

你感兴趣的文章:

标签云: