Date: Thu, 18 May 2000 20:12:50 -0400 From: "Thimble Smith" <tim@mysql.com> To: Dan Larsson <dl@tyfon.net> Cc: questions@FreeBSD.ORG Subject: Re: Howto determine if directory is empty Message-ID: <20000518201250.A3093@threads.polyesthetic.msg> In-Reply-To: <NEBBJANJCNNAKCPFKHHFCELOCDAA.dl@tyfon.net>; from dl@tyfon.net on Thu, May 18, 2000 at 12:37:40PM %2B0200 References: <NEBBJANJCNNAKCPFKHHFCELOCDAA.dl@tyfon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 18, 2000 at 12:37:40PM +0200, Dan Larsson wrote: > if [ -d $mydir -a `cd $mydir; ls -la | wc -l | awk '{print $1}'` -eq 2 ] You could simplify your version a lot: if [ `/bin/ls -1a $mydir | wc -l` -eq 2 ] Tim -- Tim Smith < tim@mysql.com > :MySQL Development Team: Boone, NC USA. 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?20000518201250.A3093>