Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions commands/files/empty-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail

##? Find empty files.
##?
##? Usage:
##? files empty-files [<path>]
##?
##? Options:
##? <path> 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