Meaning of "if [ -x /opt/OV/bin/ovpolicy ]"

Hi,

Could someone pls help me on the below command:

if [ -x /opt/OV/bin/ovpolicy ]
then
------------------
------------
fi
if [ -x /usr/lpp/OV/bin/ovpolicy ]
then
-------------
-------------------
-------------------
fi
What does this signify?

Thanks,
..

-x tests for whether the file /usr/lpp/OV/bin/ovpolicy having execute permissions...

-x means it test for file whether filename exists and is executable.

In your case ,if ovpolicy exists and is executable,,then controls goes to if block,,,otherwise not....

Hi

-x options checks whether that file exists and is a executable

Thanks
Penchal

Thanks guys..:wink: