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

Comments

Popular posts from this blog

Parsing Columns From Files WITHOUT awk

oche, lik echo but a bit easier to use.

cat abuse with split