Using find for variable combination of perms

Hi,

I'm trying to use find in kshell (AIX) to find all files with perms of
write for other
AND
any execute bit set.

e.g:
r--r-x-w- would qualify
and rw-rw--wx would qualify
but ---rwxr-xr-x wouldn't qualify

So far, I've been trying something like this:

find . -type f -perm -o=w -a \( -perm -u=x -o -perm -g=x -o -perm o=x \) -ls

But this is just giving me files with execute bit set anywhere, but not necessarily files with write for other.

Any help much appreciated thanks, Alan.

Can u try this.

 find . -perm -o=w -a \( -perm -u+x -o -perm -g+x -o -perm -o+x \) -ls
find . -type f \( -perm -102 -o -perm -012 -o -perm -003 \) -ls

Thanks millan and MadeInGermany, I will try those suggestions tomorrow during the day when I'm connected to a UNIX box again.
(It's 9:35pm here in New Zealand right now).

Will let you know how it goes. Cheers, Alan.

Ok, tried both variants suggested above, and, whaddya know, they both worked beautifully.

> find . -perm -o=w -a \( -perm -u+x -o -perm -g+x -o -perm -o+x \) -ls
   93    1 -rw-----wx  1 alanp     staff            970 Sep  6  2011 ./smit.log
   94    1 -rwx----w-  1 alanp     staff            176 Sep  6  2011 ./smit.script

> find . -type f \( -perm -102 -o -perm -012 -o -perm -003 \) -ls      
   93    1 -rw-----wx  1 alanp     staff            970 Sep  6  2011 ./smit.log
   94    1 -rwx----w-  1 alanp     staff            176 Sep  6  2011 ./smit.script


Not found (correctly) were the below
-rwx------ 1 alanp staff 20023 May 18 2012 sudo_check.sh
-rwx------ 1 alanp staff 92808 Dec 08 2011 extract_global.ksh
-rw-----w- 1 root system 2342 Dec 07 2012 wlghost1.txt
-rw-----w- 1 root system 78765 Mar 24 2009 wlghost1_lpp.txt

Thanks again millan and MadeInGermany.

Alan.