Hi,
I'm new to scripting and teaching myself how to code. Using Korn, I coded this one return "True" if a file is executable and it's not empty. However, each time I pass a file that is 777 which contains data, the script returns "false".
if [ -x -a ! -s "$1" ]
then
echo "true"
else
echo "false"
fi
By the way..
I was successful using AND when validating strings instead of a file
What am I missing?