Saturday, December 4, 2010

Salieri Mario Film Gratis

BASH: Check result

in scripts that invoke programs or sequences of commands can be useful, sometimes necessary, to verify the outcome of the last program run. Make sure that is what the return value of this program.
 # / bin / bash 
. / Program
if [$? -Ne 0];
then echo "ERROR: unexpected return value."

exit 1 fi exit 0



$? : return value of the last program called
-ne: not-equal

NOTE: By convention a value of 0 represents the output correctly without problems, and values \u200b\u200bother than 0 can be used to describe various error situations, you can not do, however, blind reliance on the convention when invoking programs written by others.

0 comments:

Post a Comment