[[email protected] ~]# expr 1 + 1
2
[[email protected] ~]# echo $?
0
[[email protected] ~]# echo 1 - 5
1 - 5
[[email protected] ~]# expr 1 - 5
-4
[[email protected] ~]# echo $?
0
[[email protected] ~]# expr 1 + -1
0
[[email protected] ~]# echo $?
1
[[email protected] ~]# expr 1 + f
expr: non-numeric argument
[[email protected] ~]# echo $?
2
时间: 2024-11-10 13:40:32