From d46570528a90508e2f6bf2289710a3fc3e49f0b3 Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 24 Oct 2022 19:44:29 +0100 Subject: Replace script name variable with bash builtin --- .local/bin/overtid | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.local/bin/overtid b/.local/bin/overtid index 3e16dad..85043c6 100755 --- a/.local/bin/overtid +++ b/.local/bin/overtid @@ -8,8 +8,7 @@ start="$(date -d "Yesterday $time_input" "+%s")" # check for arguments if [ $# -eq 0 ]; then - script="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" - printf "Decimal overtime calculator\\nUsage: %s HH:MM\\n" "${script%.*}" + printf "Decimal overtime calculator\\nUsage: %s HH:MM\\n" "${0##*/}" exit 1 fi -- cgit v1.2.3