由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - shell scripting 中的 $status 有什么特定含义吗?谢谢。
相关主题
How to tell gcc stop compiling.这个结果是啥,为什么呢?
问个C++问题,高手帮帮忙又一个初级问题: C++中多如牛毛的#define格式
怎样include一个函数C++ template preprocessor
弱问c++里有没有NULL这个keyword?forward declaration
help!无法编译一个package弱问C++一个问题 一直不解
Question about a C++ compilation error on Visual Studio 2005vc 2008: compilation error about header file
c++,这种做法不行?Windows上 Python 2.6如何安装pyquery package?
怎么样最好的编译不同文件在同一个VC project里面?引用的几个基本问题,有点糊涂
相关话题的讨论汇总
话题: status话题: scripting话题: exit话题: shell话题: 含义
进入Programming版参与讨论
1 (共1页)
v****c
发帖数: 32
1
譬如:
g++ -c arrays.cpp >& file.txt
if ( $status != 0 ) then
echo "Errors compiling arrays.cpp."
exit
endif
h***z
发帖数: 233
2
It's the exit code of the command that was just executed. In your example,
it would be the exit code of 'g++ -c arrays.cpp'.

【在 v****c 的大作中提到】
: 譬如:
: g++ -c arrays.cpp >& file.txt
: if ( $status != 0 ) then
: echo "Errors compiling arrays.cpp."
: exit
: endif

v****c
发帖数: 32
3
Thanks, hnjjz.

,

【在 h***z 的大作中提到】
: It's the exit code of the command that was just executed. In your example,
: it would be the exit code of 'g++ -c arrays.cpp'.

f**y
发帖数: 138
4
这是什么shell? 好古怪啊!
1 (共1页)
进入Programming版参与讨论
相关主题
引用的几个基本问题,有点糊涂help!无法编译一个package
Help -- How to output error messages to a file for scripts called by system calls???Question about a C++ compilation error on Visual Studio 2005
一个关于在 cygwin 中使用 R 的问题 (转载)c++,这种做法不行?
请教:函数后面的 throw() 有意义么?怎么样最好的编译不同文件在同一个VC project里面?
How to tell gcc stop compiling.这个结果是啥,为什么呢?
问个C++问题,高手帮帮忙又一个初级问题: C++中多如牛毛的#define格式
怎样include一个函数C++ template preprocessor
弱问c++里有没有NULL这个keyword?forward declaration
相关话题的讨论汇总
话题: status话题: scripting话题: exit话题: shell话题: 含义