How to compare a number stored as string to an integer value in shell scripting? Here is what I have,
if [$temp -ge 2.5] then;
when I run the above code, it gives the error as "Integer Expression expected".
Here the temp variable contains the number "3.0" as a string, I want to compare the value of temp is greater or equal to the number 2.5.
How can I do it.
Please reply soon.
Thanks in advance.
Shiva