I got again tiny problem I would like to store strings in array I got following code:
echo -e "Enter an amount"
read n
for ((i=0;i<n;i++));
do
echo "Enter number $i "
read ${array[$i]}
done
echo -e "$array[@]}"
Can you have a quick look a help me ?
Thanks
Line 5 should probably read as:
${array[$i]}, which is what you have at present, will output the value of the element of the array with the subscript $i. Thereadcommand reads user input into a specified variable, so you need to specify the variable name.