1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-10-31 16:44:36 -07:00
rc/sh/is_empty

8 lines
168 B
Bash
Executable file

#!/usr/bin/env bash
is_empty() {
while read -r; do
[ ! -d "$REPLY" ] && [ -s "$REPLY" ] && return 1
done < <(find ${1:-.})
return 0
}
is_empty "$@"