I have a small script in bash, I want to compare an old firmware version with a new one.
For example:
old fw: 2.9.7
new fw: 2.13.3
But when I run the script, it detects that 2.9 is higher than 2.13 and it doesn't update.
This is my script
#!/bin/bash
old=2.9.7
new=2.13.3
if [[ $old < $new ]];then
echo "Run the updates";else
echo "Does not need to update";fi
I get Does not need to update.