Clemens Hintze <c.hintze / gmx.net> wrote in <m3n1e7x5xi.fsf / qiao.localnet>:
>
>Would the variable $? deliver what you want?
>
>    Clemens> Clemens

Of course it does ;-) 
The mistake I made was looking at the $? value as if it were a boolean 
(i.e. "if ($?) then ..." instead of "if ($? == 1) then ...") and as 0 is 
NOT True my program didn't behave as expected.
Thanks (and sorry)
Clemens