On Thu, Aug 28, 2008 at 10:39 AM, arsyante <[EMAIL PROTECTED]> wrote:
> i m sorry maybe this is irrelevant with this milis
> but i new in linux
> in past i ussualy use batch file
> now i try to use shell script
>
> i got problem
>
> in batch file i ussualy use
> --------
> @echo off
> some command
> some command
> goto end
>
> :end
> some command
> -------
>
> what is replacement "goto end" and ":end" in bash script
> i've tried function(), but that is not excatly what i want
> i need command that jump to another part of that script
There are no labels and jumps in shell. The best you can do is use conditionals.
foo() {
commands
}
bar() {
commands
}
if [ "$somecondition" = 1 ]; then
foo
else
bar
fi
Here is some good documentation on bash (which is probably the shell
you're using):
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://tldp.org/LDP/abs/html/
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page