![]() |
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 |
| 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| check exit status - Expect Script | iamcool | Shell Programming and Scripting | 1 | 01-02-2008 09:07 AM |
| Script to check status of a PID | zeekblack | Shell Programming and Scripting | 14 | 10-03-2006 03:09 PM |
| checking exit status of a shell script | kdipankar | Shell Programming and Scripting | 2 | 05-09-2006 01:08 AM |
| check the status and send an email with status | isingh786 | Shell Programming and Scripting | 3 | 12-29-2005 07:22 PM |
| CronTab script exit status 134 | VijayKumar | Shell Programming and Scripting | 3 | 03-24-2005 11:56 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 } |
|
||||
|
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
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|