4 messages in net.sourceforge.lists.courier-maildrop[maildropl] Gone "code-blind". Can so...
FromSent OnAttachments
Ed WildgooseMar 30, 2005 6:09 am 
Stefan HornburgMar 30, 2005 6:21 am 
Tony EarnshawMar 30, 2005 6:46 am 
Thorsten HaudeApr 3, 2005 10:42 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Gone "code-blind". Can someone please spot the error hereActions...
From:Ed Wildgoose (lis@wildgooses.com)
Date:Mar 30, 2005 6:09:15 am
List:net.sourceforge.lists.courier-maildrop

OK, I have been staring at this for a while and can't see what's going wrong. It's with a 1.7.0 maildrop package:

`test -e /home` if ( $RETURNCODE = 0 ) { echo "success:${RETURNCODE}" } else { echo "failed:${RETURNCODE}" }

The output of this is always "failed" no matter what the value of RETURNCODE is. Try it with some different directories to see this.

Curiously though if you invert the sense of the test, ie "if ( $RETURNCODE != 0 )" then it works reliably. Also switching to this syntax works "if ( $RETURNCODE )".

Even more curiously adding a line: "RETURNCODE=0" above the test still gives output like "failed:0".

So this kind of points to some kind of inconsistency in the handling of the IF right?

I'm sure this is some kind of text versus numbers issue, but I can't get my head around it. Thoughts appreciated. I have a whole bunch of script to go through now and double check I didn't tickle this issue...

Thanks

Ed W