diff --git a/commands/files/empty-files.sh b/commands/files/empty-files.sh new file mode 100755 index 0000000..343b680 --- /dev/null +++ b/commands/files/empty-files.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +##? Find empty files. +##? +##? Usage: +##? files empty-files [] +##? +##? Options: +##? Path to the directory to search in [default: .] + +source "${CLI_DIR}/core/helpers.sh" +parse_help "$@" +declare path + +path=${path:-.} +msg_color="gray" + +echo_color >&2 "$msg_color" "Empty files in '$path':" +find "$path" -type f -empty + +echo_done