bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IS there a label in ksh / bash for re-startability? Can you add this


From: Bob Proulx
Subject: Re: IS there a label in ksh / bash for re-startability? Can you add this functionality?
Date: Thu, 4 Oct 2007 13:21:27 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Rajeswar N wrote:
> IF for some reason task "n" fails, I am not able to re-start the script
> from the nth step.

The shell is a programming language.  It will do exactly what you
program it to do.  It will do nothing more and nothing less.

> IS there a lable available in ksh?

There are no labels available in bash or posix shell.

> IF the same script is invoked with a argument as a label,  it should be
> able to continue from there.

If your script was written with separate modules being in separate
functions then you could invoke the functions directly.  This would
have the same effect.  Or you could program it at a lower level using
the if-then constructs using structured programming.

> Please include this as one of the requirement.
>  
> OF course goto / go to some label.

Of course a goto statement is never required in a programming
language.  There are times that it is useful (for example programming
state machines) but generally it has been abused so much that many
people have come to reject it as a general principle.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]