Current location - Training Enrollment Network - Mathematics courses - How to use exponential function in bash
How to use exponential function in bash
Bash is the most commonly used shell (command line interface) under Linux, and bash itself is also a scripting language. Bash itself has no mathematical function, but it can be used with other tools under Linux shell.

For example, with bc, you can:

$ echo 5+30 BC

35

$ echo 5*30 | bc

150

$ Echo 5 3 BC

125

It means 5+30 = 35, 5x30 = 150, and the cubic of 5 is equal to 125.