BASH
Bill Gradwohl
bill at ycc.com
Sat Dec 4 16:36:34 UTC 2004
Alexander Dalloz wrote:
>Your intention sounds a bit "obscure".
>
>
>
Maybe I should elaborate.
I'm currently working on a small script that typically runs for about 8
minutes. Part of what it does is set up a RAID array on a 3WARE
controller and then partition that space using fdisk and then format
that partition for an ext3 file system. All this takes time on a 2TB array.
While the script is executing, if I see something I want to fix or add
to the script, can I emacs the script file and modify it while it is
still being executed?
>Operate with "debug" code like echo lines of states of used variables
>and with exit instructions / codes. This will catch part 1) of your
>question too. Make use of functions.
>
>
>
I use debug code and lots of functions already, and I have some scripts
that are over 4000 lines long.
When a script exits abnormally, I'm looking for a convenient way to
quickly modify the script to immediately "goto" where the last execution
left off and continue on.
i.e. while setting up the drive array as previously described, if the
fdisk fails for whatever reason, and the script terminates, I want to
make a fix to the script to bypass the parts that already ran
successfully and retry the fdisk and continue on down thru the end of
the script.
--
Bill Gradwohl
bill at ycc.com
http://www.ycc.com
spamSTOMPER Protected email
More information about the fedora-list
mailing list