rrmdir 182 Bytes
Newer Older
Nico Schottelius's avatar
Nico Schottelius committed
1 2 3 4 5 6 7 8 9
#!/bin/sh

if [ $# -lt 1 ]; then
   echo 'Error: missing arguments' 1>&2
   echo 'Usage: rmdirtree file [file ...]' 1>&2
exit 1
fi

find "$@" -depth -type d -print0 | xargs -0 rmdir