I would like to do some quick calculation in Linux shell.
E.g. if need to do a calculation like below (combining decimal, hexadecimal, octal):
(0x255 >> 4 + 10 + 0777) / 3
Any standard Linux tool that is capable to combine all these?
- Mix of integer and floating point
- Mix of decimal, hexadecimal, binary, octal numbers
- Bitwise operations (like bitwise SHIFT, AND, NOT, OR)
I tried: bash - but it is no optimal since it can use only integers bc - IIUIC, can't use mixed decimal and hex or octal numbers. Also POSIX bc can't do bitwise operations
Источник: https://stackoverflow.com/questions/781 ... ns-floatin