Subject: Re: getting return values in a csh shell program
To: None <netbsd-help@NetBSD.ORG>
From: Eric Ding <ericding@San-Jose.ate.slb.com>
List: netbsd-help
Date: 08/29/1995 12:22:39
>>>>> "John" == John Maier <JohnAM@datastorm.com> writes:
> Okay this is what I want to do, I want to be able to read the value returned
> from a program from within a csh script.
> I.e. I execute a.out from within my script, I want to test to see if a.out
> returned a 0, 1, 2, or 3 etc.
I think this may be what you're looking for, from the csh man page:
status The status returned by the last command. If it ter-
minated abnormally, then 0200 is added to the status.
Built-in commands which fail return exit status `1', all
other built-in commands set status `0'.
Eric