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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -