I have created an array (3 elements), and each element contains a comma delimited string.The array was created by reading a file line by line - the file contains fields output from a database.I have written the code below in order to iterate through each string element, as though it were too an array.It works, apart from one strange error, the last element in the array has an additional @ symbol(also declare -A didn't work, though I've made sure I'm using bash 4 on my mac)i=0declare -a itemswhile read line    do        items[i]=$line    ((i++))    done < test_file1.txtdeclare -a item_arrfor item in ${items[@]}   do     item_arr=($item[@])   doneecho ${item_arr[4]}://${item_arr[1]}:${item_arr[3]}@${item_arr[2]}/control/configinfooutput is:https[@]://192.168.1.152:username@pwd/control/configinfoWhy is the @ symbol printing out?Am I wasting my time, should i have used awk instead? otherwise, it feels like a fairly straightforward way, but that could be as I'm relatively inexperienced. Potentially the most items I may need to initialise in this would be 1 to 200.The purpose of my code is to create a curl request to obtain some config_info, the user name, password, ip address, protocol are all pulled from a database in order to build a curl request for each item.thanks in advance!
access elements in string array - stray @ symbol
bash;array;gawk