Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use float numbers on BusyBox?

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 numbers.

Is there anything I can do?

like image 625
lauriys Avatar asked Dec 12 '25 00:12

lauriys


1 Answers

busybox should have awk.

awk 'BEGIN{print 0.5*2}' 
like image 101
ghostdog74 Avatar answered Dec 13 '25 13:12

ghostdog74



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!