From 0fdc132873dfcd85eda3e3d58d29b059f80ba23e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:03:04 +0900 Subject: [PATCH] fix: array syntax --- helpers/funcs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/funcs b/helpers/funcs index f8f0c2f..d538109 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -930,7 +930,7 @@ remove_from_favs(){ break fi done - if [[ ${#ip_list} -gt 0 ]]; then + if [[ ${#ip_list[@]} -gt 0 ]]; then readarray -t ip_list < <(printf "%s\n" "${ip_list[@]}") fi update_config @@ -938,6 +938,7 @@ remove_from_favs(){ local cache="$(< "$_cache_my_servers")" <<< "$cache" grep -v -P "$r$" > $_cache_my_servers logger INFO "Removed the record $record from saved servers" + echo "Removed $record from saved servers" return 90 } update_favs_from_table(){