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
Post a Comment