1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > shell脚本中判断上一条python命令执行情况

shell脚本中判断上一条python命令执行情况

时间:2019-02-02 00:59:21

相关推荐

shell脚本中判断上一条python命令执行情况

shell脚本中判断python命令执行结果

python脚本main.py

import sysdef main():try:"执行相关操作"sys.exit(0)except Exception as e:print(e)sys.exit(1)if __name__ == '__main__':main()

shell脚本

python main.pyif [ $? -eq 0 ];thenecho "python 代码执行成功。"elseecho "python 代码执行出错。"fi

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。