Problem with getting shell script to look two levels down...

Hi,

I am writing a shell script and I need to make sure files exist two levels below a current directory so I use the following conditional check:

if [ '/var/spool/postfix/deferred/\*/\*' ]

The way the script seems to be working is that if something exists at the first level is executes the script. I only want it to execute if it is two levels below.

How can I go about doing this?

I know you can use

if ls /var/spool/postfix/deferred/*/

That will always be successful because you are testing a non-empty string.

is_file()
{
  for f in "$@"
  do
    [ -f "$f" ] && return
  done
  return 1
}

if is_file /var/spool/postfix/deferred/*/*
then
   echo There are files 
else
   echo There are no files 
fi