I'm trying to run the below code on bash, but each time I got error ( invalid arithmetic operator) could anyone help
#!/bin/bash
for i in $(seq 20);
do
k=$(($i/100))
a=$((4.18+$k))
b=$(($a+0.01))
siesta < BiTeI.fdf > out_file #do the operation
lineno=939 # set the line number where the data you want to read is in
newline=$(sed -n "${lineno}p" "out_file") # asign a veriable for the line from the txt file note to change the file name
echo $newline >> output.txt # print the line extracted to an out put file note to generate file before adding to it
sed -i "30s/$a/${b}/" BiTeI.fdf # update the input file for new parameters for a specific raw
done