Monday, 17 August 2015

The Shell As a Calculator

Calculator !!!
Yes... We can use windows PowerShell as a Calculator.
Try it out, Just try an addition.
Open PowerShell, and type 4+6 and hit enter.

PS C:\Users\kvprasoon> 4+6

You Can use all arithmetic operations in PowerShell as you see in Above example.
Here is another example for this.
Here we have a little strange calculation, and its bit different.
Just type
PS C:\Users\kvprasoon> 1kb
Yes, It works here. Calculation in PowerShell will works with Units too.
Here it returns output in bytes.
And Finally, Interesting thing is PowerShell is well enough to understand hexadecimal values.

No comments:

Post a Comment