Am Sa, den 04.12.2004 schrieb Bill Gradwohl um 16:50: > Two questions: > > 1) When a BASH script is executed, the file that represents the script > must be read by the interpreter. Assuming the script is a long running > script, is it safe to modify the script while its executing? The real > question boils down to is the entire script read into memory or not > before execution starts, or is it read as needed from disk. I ask > because I'd like to test a script, and while its running and I see > errors, I'd like to modify the script without disturbing the executing > version. Your intention sounds a bit "obscure". > 2) There seems to be no way to "goto" in BASH. If one has a lengthy > script that fails half way down, the only thing to do appears to be to > wrap the top half in an if that won't execute so as to skip that top > half and get to where the script should again restart. Is there a better > way to do this? 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. advanced bash scripting guide: http://www.tldp.org/LDP/abs/html/ > Bill Gradwohl Alexander -- Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773 legal statement: http://www.uni-x.org/legal.html Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp Serendipity 17:10:53 up 6:29, 16 users, 0.88, 0.83, 0.82
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil