0514-86177077
9:00-17:00(工作日)
1.在shell腳本執行python腳本時,需要通過python腳本的返回值來判斷后面程序要執行的命令
例:有兩個py程序 hello.py
if __name__=='__main__': main() world.py
def main(): print "Hello"
if __name__=='__main__': main()
hello.py這樣寫
def main(): try: print "hello" sys.exit(0) except: sys.exit(1)
shell 腳本改為
標簽:南充 隨州 通遼 西藏 青島 延邊 雅安 朝陽
上一篇:shell腳本實現拷貝大文件顯示百分比的代碼分享
下一篇:linux系統中的列出敏感用戶的腳本代碼
Copyright ? 1999-2012 誠信 合法 規范的巨人網絡通訊始建于2005年
蘇ICP備15040257號-8