From 618b5e7801dd9bdc6100b6ed88f04d9dcd75a3ab Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Sun, 5 Sep 2021 23:26:37 -0400 Subject: [PATCH] Slight refactor of a usage message --- src/ctdir | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ctdir b/src/ctdir index 852b39f..db3221c 100755 --- a/src/ctdir +++ b/src/ctdir @@ -2,6 +2,7 @@ name="ctdir" version="1.0" +usage_message="Usage: ctdir TARGET [OPTIONS]" help_message=$(/usr/bin/cat <<-EOF Count entries in target directory(ies) Usage: ctdir TARGETS [..] [OPTIONS] @@ -16,7 +17,7 @@ EOF # error if no directory names given if [ "$#" -eq 0 ]; then - (>&2 /usr/bin/printf "Usage: ctdir TARGET [OPTIONS]\n") + (>&2 /usr/bin/printf "%s\n" "$usage_message") exit 1 elif [ "$#" -eq 1 ] && [ "$quiet" -eq 1 ]; then exit 1 -- 2.45.2