This looks weird:

        gate5b# rcctl ls failed
        smtpd
        gate5b# x=$(rcctl ls failed) && rcctl restart $x
        gate5b# rcctl ls failed                          
        smtpd
        gate5b# echo $?
        1
WTH?
        gate5b# x=$(rcctl ls failed) || rcctl restart $x 
        smtpd(ok)
        gate5b# rcctl ls failed                          
        gate5b# echo $?
        0

This is confusing. Imagine grep would exit 1 if it has found
something.


Regards
Harri

Reply via email to