procmail
[Top] [All Lists]

Re: test for existance of external program

2005-04-13 15:48:33
You do have a SHELL = '/bin/sh' at the start of your .procmailrc?
You did have spaces after the '[' and before the ']'?

See my previous mail. "[ .. ]" is just another name for "test ..".

sh$ type /usr/bin/awky && echo OK
/usr/bin/awky: No such file or directory
OK

That's seriously braindead. I assume you're not talking about tcsh,
which uses "where" instead of "type", and there's no external program
"type", on my Linux anyway. It's probable that "type" is always a
shell-builtin. In your case, the shell is buggy and returns useless exit
codes for "type". You shouldn't give a path though, the point of "type"
is that is looks through $PATH. If you have a path, you'd use "test".

The oldest I have access to is a Solaris 2.7:

/bin/sh -c 'type xxxx && echo OK'
xxxx not found
Exit 1

/bin/ksh -c 'type xxxx && echo OK'
xxxx not found
Exit 127

/bin/rksh -c 'type xxxx && echo OK'
xxxx not found
Exit 127

Same results with /xxxx instead of xxxx.

Thanks everyone!

Volker

-- 
Volker Kuhlmann                 is possibly list0570 with the domain in header
http://volker.dnsalias.net/             Please do not CC list postings to me.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail