Why does the values not get set in the array[@] and subsequently $i. This question has been asked before and I am aware of that , the reason I am asking here is because it doesn't work. Before you jump to mark this as duplicate, please can you let me know why it doesn't work? Not sure what is wrong here.
#!/bin/bash
DEALS=1739719, 1714630, 1733697, 1723940, 1666257, 1665239, 1674778, 1720875, 1674777, 1763086, 1735526, 1845881
IFS=', ' read -ra array <<< "$DEALS"
for i in ${array[@]}
do
echo $i
done