标签:nbsp 斜杠 ble lin aml code inux ruby ber
除以 [hadoop-user@hadoop1]$ echo `expr 9 / 3` 3
加
[hadoop-user@hadoop1]$ echo `expr 9 + 3`
12
减 [hadoop-user@hadoop1]$ echo `expr 9 - 3`
6
乘以
[hadoop-user@hadoop1]$ echo `expr 9 \* 3`
27
取余数
[hadoop-user@hadoop1]$ echo `expr 9 % 2`
1
加
-bash-4.1$ echo 9 + 3 |bc
12
乘
-bash-4.1$ echo 9 \* 3 |bc
27
减
-bash-4.1$ echo 9 - 3 |bc
6
除 -bash-4.1$ echo 9 / 3 |bc
3
取余数
-bash-4.1$ echo 9 % 2 |bc 1
标签:nbsp 斜杠 ble lin aml code inux ruby ber
原文地址:https://www.cnblogs.com/gaobo543013306/p/9651829.html