I have a workable solution but it is not presentable/clean for public usage. The file "version.txt" is both remote and local. The difference is the number:
Remote:
17 March 2022
FVWM myExtensions ver. 3.1.4
Local:
15 March 2022
FVWM myExtensions ver. 3.1.1
In my "poor" solution I manually changed the lines into one line for awk to find the last column and sed removing the dots between the number. Both results are made as variables.
awk '{print $NF}' download/version.txt > tmpGit.txt
VARgit=`sed 's|[.]||g' tmpGit.txt`
awk '{print $NF}' ~/.fvwm/version.txt > tmpLocal.txt
VARlocal=`sed 's|[.]||g' tmpLocal.txt`
if [ "$VARgit" -gt "$VARlocal" ]; then
echo "New update available.";
else
echo "No update.";
fi
I have not found a solution for finding the number in text lines and comparing multiple dot numbers. Thank you in advance.