Here we will see how to get the number A raise to the power B using bash script. The logic is very simple. We have to use the ‘**’ operator or power operator to do this. Let us see the following program to understand the concept clearly.
#!/bin/bash # GNU bash Script a=5 b=6 echo "$(($a ** $b))"