- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Bash program to find A to the power B?

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.

## Example

#!/bin/bash # GNU bash Script a=5 b=6 echo "$(($a ** $b))"

## Output

15625

- Related Questions & Answers
- Find multiple of x closest to or a ^ b (a raised to power b) in C++
- Bash program to check if the Number is a Palindrome?
- 8085 program to find nth power of a number
- C++ Program to find whether a number is the power of two?
- Python Program to find whether a no is the power of two
- Find FIRST & FOLLOW for the following Grammar. S → A a A | B b B A → b B B → ε
- Bash program to check if the Number is a Prime or not
- Program to Find Out the Maximum Final Power of a List in Python
- Program to find out the value of a power of 2 in Python
- Python Program to find whether a no is power of two
- Program to find Reordered Power of 2 in Python
- Java program to calculate the power of a number
- Program to find N-th term of series a, b, b, c, c, c…in C++
- Program to find Nth term divisible by a or b in C++
- Program to find greater value between a^n and b^n in C++

Advertisements