码迷,mamicode.com
首页 > 系统相关 > 详细

Math operator in a Shell Script

时间:2016-09-28 15:58:06      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

Operators

The shells use arithmetic operators from the C programming language, in decreasing order of precedence.Math 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

标签:

原文地址:http://www.cnblogs.com/ordili/p/5916035.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!