![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| what is meaning of exit(0) and exit(1) | amitpansuria | UNIX for Dummies Questions & Answers | 1 | 08-28-2007 03:02 AM |
| exit(0) versus exit(1) | enuenu | High Level Programming | 9 | 06-22-2007 10:56 AM |
| exit | dhananjaysk | Shell Programming and Scripting | 2 | 04-06-2006 08:34 AM |
| Where can I find a list of exit codes? (Exit code 64) | jkuchar747 | UNIX for Dummies Questions & Answers | 3 | 12-07-2004 06:08 PM |
| How to exit ssh | davidg | UNIX for Advanced & Expert Users | 1 | 10-16-2003 07:10 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am running HP-UX & ksh
I have several validation programs that scan log files for error messages. One of these files scan 3 diff files, thus I have the exit value in a variable and depending on which log-file I am scanning the value changes. I am not getting the value I expect but a different value ( echo $? displays 213 - expect -777). So my question is: Can you exit with a variable instead of a fixed value? exit $xerr (where xerr=-777) vs. exit -777 THX in advance. ![]() |
|
||||
|
The exit value should be larger than what can be represented in eight bits: 0-127 signed or 0-255 unsigned.
Stick with numbers like 101, 102, 103 This is because unix wait strips all but the lowest eight bits from the return code before passing it to "$?" |
![]() |
| Bookmarks |
| Tags |
| exit, exit value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|