![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| check exit status - Expect Script | iamcool | Shell Programming and Scripting | 1 | 01-02-2008 06:07 AM |
| Script to check status of a PID | zeekblack | Shell Programming and Scripting | 14 | 10-03-2006 12:09 PM |
| checking exit status of a shell script | kdipankar | Shell Programming and Scripting | 2 | 05-08-2006 10:08 PM |
| check the status and send an email with status | isingh786 | Shell Programming and Scripting | 3 | 12-29-2005 04:22 PM |
| CronTab script exit status 134 | VijayKumar | Shell Programming and Scripting | 3 | 03-24-2005 08:56 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have a main program which have below lines - awk -f test.awk inputFileName - I wonder how to check status return from awk script. content of awk script: test.awk --- if ( pass validation ) { exit 1 } else { exit 0 } |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
the awk man page says that for exit <value> - value is returned to the shell and must be a value from 0 - 255
Code:
awk -f test.awk inputFileName
if [ $? -eq 0 ] ; then
echo "Pass"
else
echo "Fail"
fi
|
|||
| Google The UNIX and Linux Forums |