I am facing a problem with bash script: I have a set of variables 'i' that ranges from 3.31 up to 3.35. My script prints out, as a function of the variable 'i' some input file for geometrical optimization. The point is that I need to change the $i variable in the path of the script to an integer for efficiency reasons. I thought to divide the variable every time by itself, store it in another variable called e.g. ans, and use $ans into my script so that the output is properly fine. Can you kindly suggest to me how to fix this problem? It looks like it is not possible to divide a variable per se.Thanks in advanceHere and example of how i would do this stuff:for i in `seq 3.31 0.01 3.35`  do  ...     touch file$i.dat      echo %nproc=6 >> file$i.datans=$(($i/$i))echo %chk=$PWD/conf$ans/s0.chk >> file$i.dat
To divide a a loop variable per se and save in another one to be used later
variable substitution;math