we want to set variable that includes words as array
folder_mount_point_list="sdb sdc sdd sde sdf sdg"
ARRAY=( $folder_mount_point_list )
but when we want to print the first array value we get all words
echo ${ARRAY[0]}
sdb sdc sdd sde sdf sdg
expected results
echo ${ARRAY[0]}
sdb
echo ${ARRAY[1]}
sdc
how to convert variable to array?
$IFS
?IFS=$' \t\n'
to your script?IFS
instead of keeping it at its? UnsettingIFS
has the same effect as setting it likeIFS=$' \t\n'