POSIX find(1)'s desc. # wrote:
The following exit values shall be returned:
All path operands were traversed successfully.
An error occurred.
You can't only
check whether a file exists with find
Your piece of code will always be printing « yes »
provide a non-existing directory or pass incorrect arguments.
You're not using any extglob
pattern, enabling it is useless.
You'll make bash
(1) happy by telling it not to seek for them.
Also, I would just check whether there is one
element in fileList
getting the number of elements which isn't needed to be known; as in:
[[ $fileList ]] && ...