executing part of a script
by Skaperen from LinuxQuestions.org on (#52DV0)
i would like to find a good clean way to run just a selected part of a script such as specific like numbers.
with separate files, i find it easy enough to run parts of a script with reboot between those parts. i would like to redesign this so that it is all in one file yes at designated places i can have the system rebooted and resume running the script right after that. the goal is to have function to reboot the system and running the script resumes at that point when the system comes back up.
i want to do this in Bash and/or Pike and/or Python. the script will be run by a user authorized to run sudo to do root commands.
any ideas?


with separate files, i find it easy enough to run parts of a script with reboot between those parts. i would like to redesign this so that it is all in one file yes at designated places i can have the system rebooted and resume running the script right after that. the goal is to have function to reboot the system and running the script resumes at that point when the system comes back up.
i want to do this in Bash and/or Pike and/or Python. the script will be run by a user authorized to run sudo to do root commands.
any ideas?