I have the following code :
#!/bin/bash
pontos=$(cat condutores.txt | cut -d ":" -f 10)
nviagens=$(cat condutores.txt | cut -d ":" -f 9)
divisao=$((pontos / nviagens))
echo $divisao
I want to divide the 10th column of each line with 9th column of condutores.txt
. Save it in a variable and check if the number is less than 5 . However the division does not work properly.