Linux Bash Maths Raise To The Power Example
Page 1 of 1
Linux Bash Maths Raise To The Power Example
- Code:
#!/bin/bash
# Usage: ./Power.sh 19
#
var=("$@") # User Input
echo "$var"^6 | bc # Customize to whatever Power you want, default here is 6
Re: Linux Bash Maths Raise To The Power Example
To use a range without the need for loops
- Code:
#!/bin/bash
# Usage: ./range.sh
#
echo {1..99}
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|