
- AWK Tutorial
- AWK - Home
- AWK - Overview
- AWK - Environment
- AWK - Workflow
- AWK - Basic Syntax
- AWK - Basic Examples
- AWK - Built in Variables
- AWK - Operators
- AWK - Regular Expressions
- AWK - Arrays
- AWK - Control Flow
- AWK - Loops
- AWK - Built in Functions
- AWK - User Defined Functions
- AWK - Output Redirection
- AWK - Pretty Printing
- AWK Useful Resources
- AWK - Quick Guide
- AWK - Useful Resources
- AWK - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AWK - Exponential Operators
There are two formats of exponential operators −
Exponential Format 1
It is an exponential operator that raises the value of an operand. For instance, the following example raises the value of 10 by 2.
Example
[jerry]$ awk 'BEGIN { a = 10; a = a ^ 2; print "a =", a }'
On executing this code, you get the following result −
Output
a = 100
Exponential Format 2
It is an exponential operator that raises the value of an operand. For instance, the following example raises the value of 10 by 2.
Example
[jerry]$ awk 'BEGIN { a = 10; a = a**2; print "a =", a }'
On executing this code, you get the following result
Output
a = 100
awk_operators.htm
Advertisements