Search Results

Search: Posts Made By: ngabrani
6,885
Posted By Neo
You need to insure the script is in your path...
You need to insure the script is in your path (environment).

One way ahead is to use the full path to the script. There are other ways to solve this problem as well.

Maybe post back the output...
15,303
Posted By jim mcnamara
Use bc if (( $(echo "$num1 > $num2" |bc -l)...
Use bc

if (( $(echo "$num1 > $num2" |bc -l) )); then
echo "ok"
fi


bc does floating point comparisons, in bash you have to surround it with (( )) to get a boolean (true/false) result.
21,789
Posted By wisecracker
I am assuming you are using bash or perhaps a...
I am assuming you are using bash or perhaps a POSIX shell like dash.
Your error is telling you that it is not possible to do such a task as these shells have INTEGER arithmetic only.

If you need...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 10:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy