shell - keep expanding a bash variable -


imagine have n months, here n=3

i keep adding integer 1, 2, 3 shell variable called $test:

so when do

cat $test 

it return

1 2 3 

any idea?

just find solution:

for ((i=1;i<=3; i++));   test1="${i}"  test+="$test1 "  done 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -