I would like to run obj2opengl.pl with all files in
/Users/KanZ/Desktop/Project/Test/Model/Object
which are name A001.obj A002.obj ... After run the script, I will get A001.h A002.h ... and I would like to move these files to
/Users/KanZ/Desktop/Project/Test/Model/Header
How can I adapt this code below *the problems are at A${i}.obj and A${i}.h
cd /Users/KanZ/Desktop/Project/Test/Model/Object
start=1
n=$(find . -name "*.obj" | wc -l)
end=$(($n));
for((i=$start;i<=$end;i++))
do
./obj2opengl.pl "A${i}.obj"
mv "A${i}.h" /Users/KanZ/Desktop/Project/Test/Model/Header
done
If I adapt my code by using if statement , How can I fix this code for the right syntax For example:
cd /Users/KanZ/Desktop/Project/Test/Model/Object
start=1
a=0
b=0
c=1
n=$(find . -name "*.obj" | wc -l)
end=$(($n));
for((i=$start;i<=$end;i++))
do
./obj2opengl.pl "A${a}${b}${c}.obj"
mv "A${i}.h" /Users/KanZ/Desktop/Project/Test/Model/Header
c++
if[$c > 9] then
b++
c=0
fi
if[$b>9] then
a++
b=0
c=0
fi
done