Math operator in a Shell Script
Posted ordi
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Math operator in a Shell Script相关的知识,希望对你有一定的参考价值。
Operators
OPERATOR | DESCRIPTION |
++ −− < /editor query > | Auto-increment and auto-decrement, both prefix and postfix |
+ | Unary plus |
− | Unary minus |
! ~ | Logical negation; binary inversion (one‘s complement) |
* / % | Multiplication; division; modulus (remainder) |
+ − | Addition; subtraction |
<< >> | Bitwise left shift; bitwise right shift |
<= >= | Less than or equal to; greater than or equal to |
< > | Less than; greater than |
== != | Equality; inequality (both evaluated left to right) |
& | Bitwise AND |
^ | Bitwise exclusive OR |
| | Bitwise OR |
&& | Logical AND |
|| | Logical OR |
以上是关于Math operator in a Shell Script的主要内容,如果未能解决你的问题,请参考以下文章
java Operator ‘/‘ cannot be applied to ‘java.math.BigInteger‘, ‘int‘
shell脚本中 unary operator expected解决办法
运用循环求和( sum operation in python)
hadoop错误Operation category READ is not supported in state standby