Package: moreutils
Version: 0.16
Severity: wishlist

Hi,
Testing a directory to be empty in bash is hackish, see
http://wooledge.org/mywiki/BashFaq#head-6ec77504553115e8518271d0d319e27148634f19

The cleanest way probably is
if [ -z "$(ls -A "$dir")" ]; then
fi

Maybe we should add a small utility which does test this in a sane way.

if dirempty "$dir"; then
fi

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17.7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages moreutils depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  perl                         5.8.8-6.1   Larry Wall's Practical Extraction 

moreutils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to