Shell programming - interpreting use of $? with function call?

Is the exit code from the last command. See Shell Command Language: Special Parameters for the list of such special variables in POSIX shells The showerr function logs an error if its first parameter is not 0 So: some_super_script_that_might_fail showerr $?"SuperScript failed will only log something if some_super_script_that_might_fail s exit code is not 0 (which traditionally means that it failed) showerr 1 "message will always log showerr 0 "message will never do anything.

Is the exit code from the last command. See Shell Command Language: Special Parameters for the list of such special variables in POSIX shells. The showerr function logs an error if its first parameter is not 0.

So: . /some_super_script_that_might_fail showerr $?"SuperScript failed" will only log something if . /some_super_script_that_might_fail's exit code is not 0 (which traditionally means that it failed).

Showerr 1 "message" will always log. Showerr 0 "message" will never do anything.

Mat - thanks for your input and the link. – jdamae Jul 26 at 18:12.

Is the exit code from the last command. See Shell Command Language: Special Parameters for the list of such special variables in POSIX shells.

Mat - thanks for your input and the link. – jdamae Jul 26 '11 at 18:12.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions