How to restart a script from the top

Hi folks!

I'm starting to get pretty good at this, I still have a question left. I can't seem to figure out how to start a script from the top once it completes...

SunOS 5.7 with Bash 2.01.

Here's a "schedule" of my script:

  1. First I have some functions declared
  2. The functions are called
  3. Then display result
  4. Next I need to start from top without quiting script

Is there a way to use "goto" as you would in DOS-batch language? I know that there is no "goto" command in Bash and know from the Advanced Bash-Scripting Guide that functions will do exactly the same.

However, I can't seem to make it work... :confused:

If your intention is to execute the steps:1 through 3, in a loop indefinitly, just put the steps :2 through 3 inside an indefinite while loop.

Else, just give the command to invoke your shell script, in the last line of your shell script.

Deepa

Did the trick! Thanks for the reply!