[X-Unix] Bash scripting Question

Stroller macmonster at myrealbox.com
Tue Aug 22 20:52:02 PDT 2006


On 23 Aug 2006, at 04:17, Eric F Crist wrote:
> ...
> I would ask first if there is a different exit code for someone  
> being connected and nobody being connected.  You can check this by  
> running fmsadmin and ...  After it executes, type "echo $?" at the  
> command line (minus the quotes).

I wondered this, but I believe that programs should return an  
exitcode of 0 if they are successful, non-zero only as an error  
condition.

Whilst exit codes can be useful to determine WHY a command has failed  
(because the file tested doesn't exist, because you don't have  
permission to access it, because the parameters applied are invalid,  
&c &c) I assumed that `fmsadmin` would believe its job to be done  
correctly whether it reported no clients or a number of them  
connected. I would anticipate it would exit 0 in either case.

Stroller.


		
___________________________________________________________ 
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html


More information about the X-Unix mailing list