From c76d7402d3e0a4d18e6bd163b1740821abb2f24e Mon Sep 17 00:00:00 2001 From: th33xitus Date: Wed, 27 Apr 2022 12:10:38 +0200 Subject: [PATCH] fix: arithmetic expression caused issues * replace it with string conditional Signed-off-by: Dominik Willner th33xitus@gmail.com --- scripts/upload_log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upload_log.sh b/scripts/upload_log.sh index 73ab117..29c021b 100755 --- a/scripts/upload_log.sh +++ b/scripts/upload_log.sh @@ -87,7 +87,7 @@ function upload_selection(){ back_footer while true; do read -p "${cyan}###### Please select:${white} " option - if [ -n "${option}" ] && ((option < ${#logfiles[@]})); then + if [[ -n "${option}" && "${option}" -ge 0 && "${option}" -lt "${#logfiles[@]}" ]]; then upload_log "${logfiles[${option}]}" upload_selection elif [[ "${option}" == "B" || "${option}" == "b" ]]; then