RosettaCodeData/Task/Empty-directory/UNIX-Shell/empty-directory.sh

4 lines
101 B
Bash
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
#!/bin/sh
DIR=/tmp/foo
[ `ls -a $DIR|wc -l` -gt 2 ] && echo $DIR is NOT empty || echo $DIR is empty