Re: Gestion des codes d'erreurs

Top Page

Reply to this message
Author: Pierre Pronchery
Date:  
To: Guilde
Subject: Re: Gestion des codes d'erreurs
Philippe B wrote:
> RETURN CODES
>        0 : No virus found.

>
>        1 : Virus(es) found.

>
>        2 : Error occured.

>
> comment gerer ca en bash ??

if [ $? -eq 0 ]; then
    echo no virus found
elif [ $? -eq 1 ]; then
    echo virus(es) found
elif [ $? -eq 2 ]; then
    echo error occured
fi



--
Pierre