Fwd: Re: exit code ?

Emil Isberg emil.isberg at mds.mdh.se
Tue Mar 28 15:14:48 EST 2000


On Tue, 28 Mar 2000, George Meharry II wrote:
>I think the question is how to get the $status from
>the command sudo executed.

Yes, I thought so to...

So I wrote two simple examples so that you can see the behavior of sudo
(and exec*() ).

prompt$ sudo false && echo true || echo false
false
prompt$ sudo true && echo true || echo false
true

As you can see sudo simply "forwards" the exit code (or rather it never
see it as it has left total control to the sub program).

-- 
Women are nothing but machines for producing children.
                -- Napoleon




More information about the sudo-users mailing list