From 7e54497f8889427cfaad5893b265309a7b60dfc7 Mon Sep 17 00:00:00 2001 From: Marc-Aurèle Brothier Date: Sun, 21 Jan 2018 22:24:20 +0100 Subject: Use a compatible to lowercase syntax for bash < 4 (#41) --- otp.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp.bash b/otp.bash index 6a28fbd..16d0ef4 100755 --- a/otp.bash +++ b/otp.bash @@ -317,7 +317,7 @@ cmd_otp_code() { case "$otp_type" in totp) cmd="$OATH -b --totp" - [[ -n "$otp_algorithm" ]] && cmd+="=${otp_algorithm,,}" + [[ -n "$otp_algorithm" ]] && cmd+=$(echo "=${otp_algorithm}"|tr "[:upper:]" "[:lower:]") [[ -n "$otp_period" ]] && cmd+=" --time-step-size=$otp_period"s [[ -n "$otp_digits" ]] && cmd+=" --digits=$otp_digits" cmd+=" $otp_secret" -- cgit v1.2.3