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

string - Using python and postgres, variables within execute function? -

android - How to get the Uri path from a ImageView? -