diff options
-rwxr-xr-x | tmp.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -58,9 +58,10 @@ URLS_tmp['target_url']='https://mcepl.fedorapeople.org/tmp/' URLS_tmp['shorten_api']='https://da.gd/s?url=' declare -A URLS -URLS['barstool']=URLS_barstool[@] -URLS['wotan']=URLS_wotan[@] -URLS['tmp']=URLS_tmp[@] +# b=( "${a[@]}" ) +URLS['barstool']=( "${URLS_barstool[@]}" ) +URLS['wotan']=( "${URLS_wotan[@]" ) +URLS['tmp']=( "${URLS_tmp[@]" ) # Requires GNU sed CMDNAME="$(echo "$(basename $0)"|sed 's/./\L&/g')" @@ -68,14 +69,14 @@ declare -A config echo ${@:1} -for elem in ${URLS[$CMDNAME]} +for elem in "${URLS[$CMDNAME]}" do # echo "key : ${elem}" -- "value: ${config[${elem}]}" config[${elem}]=${URLS[$CMDNAME][${elem}]} done -echo ${config[@]} -echo ${!config[@]} +echo "${config[@]}" +echo "${!config[@]}" exit 0 |