#!/bin/bash
NUM1=10.0
NUM2=20.5
if [ $(bc <<< "${NUM1} <= ${NUM2}") -eq 1 ]; then
...
fi
#!/bin/bash
NUM1=10.0
NUM2=20.5
if [ $(bc <<< "${NUM1} <= ${NUM2}") -eq 1 ]; then
...
fi
本文标题:shell如何比较两个浮点数
本文链接:https://www.haomeiwen.com/subject/cghxmktx.html
网友评论