Add empty_file()-helper. To be used later.

This commit is contained in:
Gerhard Hoffmann 2023-06-29 13:22:19 +02:00
parent 4921cb9f06
commit f7badfea2e

View File

@ -115,4 +115,12 @@ if [ "${general_utils_sourced:-1}" = "1" ]; then # include only once
# log_debug "$1=$__n" # log_debug "$1=$__n"
: :
} }
empty_file () {
if [[ -f "$1" ]]; then
echo -n "" > $1
else
log_error "$1 does not exist"
fi
}
fi fi