1 2 3 4 5 6 7 8 9 10
#!/bin/bash for file in "${1%/*}"/*; do if [ "$file" != "$1" ]; then rm "$file" exit $? fi done exit 1