![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exception Handling | bertpereira | Shell Programming and Scripting | 5 | 01-14-2009 09:28 PM |
| shell programs | rameshparsa | Shell Programming and Scripting | 1 | 11-17-2005 10:07 PM |
| Linux g++ 2.95.3 exception handling | earl | High Level Programming | 0 | 08-16-2005 02:46 PM |
| exception handling | RichardS | UNIX for Advanced & Expert Users | 1 | 06-16-2004 06:29 PM |
| different shell programs,processes | ramyar | UNIX for Dummies Questions & Answers | 1 | 12-19-2001 06:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi all,
I am writing a set of scripts and some of these are nested within others. I want to be able to execute a single high-level script at the command-line, which in turn may invoke other scripts as required, and when a failure occurs in any of the nested scripts, I want to be able to track the deepest-nested command causing the failure and preferably a call trace. To do this, trap could be used I was told but I am not sure trap's functionality is enough for my need. What do you think is the best way here? It's a constraint at this place that I use only shell and not a full-blown programming language. Any help from you guys is greatly appreciated. Best Regards, Chaitanya |
|
||||
|
Hi blowtorch,
No, I wasn't planning on putting detailed error checks in each of the scripts...they are too long (5000+ lines) and doing that that would take me forever. I am looking more from a less-involved solution. Do you think it's possible actually? Something like - (I am vague I know but it's the best I can do!) - 1. Start a guarded environment at the beginning of each script (guarded as in - each command is executed and if it succeeds, alright; otherwise, break the whole program right there). 2. Execute each command in the script (without explicitly coding for error-checking, i.e.) 3. Run an event like trap in case of failure, and fire an email. What do you say...? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|