From owner-freebsd-questions Sun May 27 21:46:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.cybersurf.net (smtp2.cybersurf.net [209.197.145.112]) by hub.freebsd.org (Postfix) with ESMTP id 1AD5B37B424 for ; Sun, 27 May 2001 21:46:26 -0700 (PDT) (envelope-from 01031149@3web.net) Received: from 3web.net ([209.197.133.99]) by smtp2.cybersurf.net (Netscape Messaging Server 4.15) with SMTP id GE13XC00.C1C for ; Sun, 27 May 2001 22:46:24 -0600 Received: by 3web.net (EzMTS MTSAgent 1.22b Service) ; Sun, 27 May 01 22:45:47 -0600 for Received: from 3web.net (10.0.0.2) by 3web.net (EzMTS MTSSmtp 1.50 Service) ; Sun, 27 May 01 22:42:42 -0600 for Received: by mandy.rockingd.calgary.ab.ca (sSMTP sendmail emulation); Sun, 27 May 2001 22:42:23 +4200 Date: Sun, 27 May 2001 22:42:22 -0600 From: Duke Normandin <01031149@3web.net> To: Freebsd Questions Subject: Need help with Bash function Message-ID: <20010527224221.A111533@mandy.rockingd.calgary.ab.ca> Mail-Followup-To: Freebsd Questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Envelope-Receiver: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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