Newsgroups: comp.unix.questions
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!stowe.cs.washington.edu!pauld
From: pauld@stowe.cs.washington.edu (Paul Barton-Davis)
Subject: Re: How do I tell when a directory is empty in a script?
Message-ID: <1991Apr15.180550.14750@beaver.cs.washington.edu>
Sender: news@beaver.cs.washington.edu (USENET News System)
Reply-To: pauld@cs.washington.edu (Paul Barton-Davis)
Organization: Computer Science & Engineering, U. of Washington, Seattle
References: <1991Mar30.040400.13893@ncsu.edu> <1991Mar30.225406.20493@dg-rtp.dg.com> <1991Apr3.142150.4445@athena.mit.edu> <9424@mentor.cc.purdue.edu> <900@homer.UUCP>
Date: Mon, 15 Apr 91 18:05:50 GMT

In article <900@homer.UUCP> root@homer.ORG (Marc Brumlik) writes:

>it can be even easier than this...  how about:
 [ deleted ]

why not just:

	if [ "`cd $1 ; echo *`" ] ; then
	   echo "not empty"
	else
	   echo "empty"
	fi



-- 
Paul Barton-Davis			<pauld@cs.washington.edu>
UW Computer Science Lab		``to shatter tradition makes us feel free''
