I have two arrays. One containing city names and the other with numbers with decimals. I wanted to make a statement where I pick the lowest number, and based on the position of that number I choose the city. what I have so far looks like this:
min=1000
for j in {1..9};
do
        for g in "${array2[$j]}";
        do
                if [ $g -lt $min ]; then
                        min = $g
                        city2="${array[$j]}"
                fi
done;
done;
echo $city2
I get an error saying an integer is expected. How could I fix this? I know it has something to do with the fact that my numbers have decimals.
