[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

evaluating exit status (if, then..)



i'm having a problem evaluating the exit status using rpost

----------------------------------------------
if rpost localhost -M < test
        then
        echo -e "\n\nArticle posted"
else
        echo -e "\n\nError: Article Not posted"
fi
-----------------------------------------------
for a post with no 'newsgroups:' header it works :

(posting ok).
340 Ok
441 Required "Newsgroups" header is missing
Malfunction, Unable to post Article!
Closing connection to enfys.A470.demon.co.uk

Error: Article Not posted
------------------------------------- etc
but for a duplicate post, it doesn't :

(posting ok).
340 Ok
441 435 Duplicate
Duplicate article, unable to post
Closing connection to enfys.A470.demon.co.uk

Article posted
-------------------------

rpost is giving an exit status of '0' even
if it's a duplicate.  how can i test for this?

-- 
|<ris */ witty signature comment /*



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]