- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- 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
Advertisements