fix(_cache.sh): quote $@ and use $* with echo

This commit is contained in:
openoms 2024-04-07 16:04:47 +02:00
parent b65fbf066d
commit 097016c71f
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65

View File

@ -209,13 +209,13 @@ elif [ "$1" = "set" ] || [ "$1" = "init" ]; then
elif [ "$1" = "get" ]; then elif [ "$1" = "get" ]; then
position=0 position=0
for keystr in $@ for keystr in "$@"
do do
# skip first parameter # skip first parameter
((position++)) ((position++))
if [ $position -eq 1 ]; then if [ $position -eq 1 ]; then
echo "# _cache.sh $@" echo "# _cache.sh $*"
continue continue
fi fi
@ -429,13 +429,13 @@ elif [ "$1" = "valid" ]; then
position=0 position=0
lasttouch_overall="" lasttouch_overall=""
for keystr in $@ for keystr in "$@"
do do
# skip first parameter from script - thats the action string # skip first parameter from script - thats the action string
((position++)) ((position++))
if [ $position -eq 1 ]; then if [ $position -eq 1 ]; then
echo "# _cache.sh $@" echo "# _cache.sh $*"
continue continue
fi fi