Simpler list to data
# Define a list.
x='a d c f g'
# Just expand the list inside parenthesis
a=($x)
# Here is the resulting array.
echo ${a[@]}
a d c f g
echo ${a[1]}
d
x='a d c f g'
# Just expand the list inside parenthesis
a=($x)
# Here is the resulting array.
echo ${a[@]}
a d c f g
echo ${a[1]}
d
Comments
Post a Comment