Empty directory: Difference between revisions

Added UNIX Shell solution
(Add Racket entry)
(Added UNIX Shell solution)
Line 472:
expr {![llength [lsearch -all -not -regexp $filenames {^\.\.?$}]]}
}</lang>
 
=={{header|UNIX Shell}}==
<lang bash>
#!/bin/sh
DIR=/tmp/foo
[ `ls -a $DIR|wc -l` -gt 2 ] && echo $DIR is NOT empty || echo $DIR is empty
</lang>
 
{{omit from|ACL2}}