Also, I assume you want the counter (i) to be 1 the first time it is used?
If so you can do the following:
Code:
#Set initial value to 1
i=1
while read -r myxcoord myycoord
do
<do some stuff>
./dc_2002 && ./st_vac
cp motion.out "$i$stn$mt"
cp time.out "$((i++))$stn$vel"
<do more stuff>
done
Notice only the second copy needs to increment the counter.
And crts is correct that there should be no spaces in seds