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

Bithon: Run Python Interactively Inside Bash

Function which will accept stdin or arguments