String Concatenation

Hi All,

I need to concatenate the values in the array into a variable. Currently the code is :

for (( i=1 ; i <= $minCount ; i++ ))
do
   var="${var}""${sample_file[$i]}"
done

The output is :

/tmp/1/tmp/2/tmp/3/tmp/4/tmp/5/tmp/6/tmp/7/tmp/8/tmp/9/tmp/10

I need a space between the values as follows:

/tmp/1 /tmp/2 /tmp/3 /tmp/4 /tmp/5 /tmp/6 /tmp/7 /tmp/8 /tmp/9 /tmp/10

so that I can apply command to all the files.

How should I go about adding a space after every values?

Thanks,

 var="${var} ${sample_file[$i]}"