compare decimal and integer values in if in bash shell

i need to do camparisions like the below.
For the case when first[1]=10 and second[1]=9.9 the scripts displays process failed.

I need to be able to convert the values to integer before doing the comparision.
Like 9.9 should be rounded over to 10 before doing comparision.

Please advice how can I do this.

for i in 1 2 3 4 5 6 7 8 9
do
  if [ ${first} -gt `${seoond} / 10` ]
  then
      echo "process failed "
      break
  fi
done

bash only supports integer arithmetic, it does not support floating point arithmetic. You have to use a external utility such as bc to do floating point arithmetic.

I am new to shell scripting and not sure how to do this.

Could you please help me with an example

Thanks a lot for your help.

A common method is to 1) add .5 to your value and then 2) apply an int() function. So, something like:

 echo 9.9 | awk '{print int($1 + 1)}'