I tried everything, but I still can't get the while loop to stop based on the following condition:
#!/bin/sh
clear
counter=1
breakCond=$(tail -n 1 /home/a/Desktop/Triple_Graphs/11_nodes/Res/Com_Output.txt|sed -r 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/')
cd /home/a/Desktop/cliquer-1.21
rm /home/a/Desktop/Triple_Graphs/11_nodes/Res/Com_Output.txt
clear
Mu=$(head -1 /home/a/Desktop/Triple_Graphs/11_nodes/Mu.txt)
while [[ $counter -le 97 && $breakCond -ne $Mu ]]
do
#echo $counter| tee -a outErr.txt
./cl -u /home/a/Desktop/Triple_Graphs/11_nodes/G_$counter.txt &> /home/a/Desktop/Triple_Graphs/11_nodes/Res/calculated_$counter.txt
#echo -e "calculated_$counter.txt \n"
output=$(tail -1 /home/a/Desktop/Triple_Graphs/11_nodes/Res/calculated_$counter.txt)
echo $output>>/home/a/Desktop/Triple_Graphs/11_nodes/Res/Com_Output.txt
((counter++))
breakCond=$(tail -n 1 /home/a/Desktop/Triple_Graphs/11_nodes/Res/Com_Output.txt|sed -r 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/')
done
The second condition in my while loop does not work. I'm reading two values from txt files ("breakCond" and "Mu") and attempting to compare them.