摘要: Shell整数的运算 a=2 b=1 c=$((a+b)) d=$((a-b)) Shell浮点数运算 Shell本身不支持浮点数运算,(())之类的数学运算符只能进行整数运算。要想在shell中运算浮点数,只能借助于bc, Awk或者Perl。 如 bc方式 a=0.1 b=0.2 c=$(ech 阅读全文
posted @ 2021-09-08 15:06 明月, 阅读(902) 评论(0) 推荐(0) 编辑