Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2001 22:42:22 -0600
From:      Duke Normandin <01031149@3web.net>
To:        Freebsd Questions <freebsd-questions@freebsd.org>
Subject:   Need help with Bash function
Message-ID:  <20010527224221.A111533@mandy.rockingd.calgary.ab.ca>

next in thread | raw e-mail | index | archive | help

I'm trying to debug the following function w/o much success.

function ezq() {
if [ -a ~/tmp/* ]; then
    echo -e "there's something here....\n"
else
    echo -e "empty....\n"
fi
}
I keep on getting:

'[: binary operator expected'

Is it whinning about the '-a' above? Why?

All I want to do is to check to see if a directory is empty or not.
TIA...
-- 
-duke
Calgary, Alberta, Canada


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010527224221.A111533>