- 论坛徽章:
- 145
|
本帖最后由 jason680 于 2014-03-14 10:21 编辑
回复 13# mvptiandan
do it and take it by yourself
程序是
依照写出来(的code),跑出结果
不是依照你想出来的,得到结果
# set -x; echo 1+1; set +x
+ echo 1+1
1+1
+ set +x
# set -x; echo '1+1'; set +x
+ echo 1+1
1+1
+ set +x
# set -x; echo "1+1"; set +x
+ echo 1+1
1+1
+ set +x
# set -x; echo `1+1`; set +x
++ 1+1
-bash: 1+1: command not found
+ echo
+ set +x
# set -x; echo `expr 1+1`; set +x
++ expr 1+1
+ echo 1+1
1+1
+ set +x
# set -x; echo `expr 1 + 1`; set +x
++ expr 1 + 1
+ echo 2
2
+ set +x
# set -x; echo 1+1|bc; set +x
+ bc
+ echo 1+1
2
+ set +x
|
|