[CentOS] Getting the return value of the last command run
dotancohen at gmail.com
Mon May 30 22:17:08 UTC 2011
On Tue, May 31, 2011 at 01:14, fred smith <fredex at fcshome.stoneham.ma.us> wrote:
> Yes, all commands return a value UNLESS it was written by one of the
> idi,... er, misguided programmers who thinks its ok to write (in
> void main (void)
> because, of course, in C main() always returns SOMETHING.
> I'm sure it's the same in a bash script, even if the script doesn't
> explicitly provide a return value I imagine the shell returns something
> anyway, it's just that it's meaningless when that happens.
I also learned in C that main should be an int. Now that I'm studying
Java, main is always a void and nobody has been able to explain to me
More information about the CentOS