开发者

How to use float numbers on BusyBox?

开发者 https://www.devze.com 2022-12-19 12:26 出处:网络
I have a little computer with BusyBox, and compiling anything on it is a nightmare. I want to do something simple like \"0,5*2\", but can\'t without additional software.

I have a little computer with BusyBox, and compiling anything on it is a nightmare.

I want to do something simple like "0,5*2", but can't without additional software.

I tried "expr", "let", and just can't do any operation with float numb开发者_Python百科ers.

Is there anything I can do?


busybox should have awk.

awk 'BEGIN{print 0.5*2}' 


busybox has dc built in. Here's a link to all of the documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消