看板 [ Linux ]
討論串[問題] 請問shell script中export環境變數的問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者vincente (文生弟)時間17年前 (2008/09/16 14:07), 編輯資訊
0
0
0
內容預覽:
要有 父子行程 的觀念,子行程可以繼承父行程的環境變數,. 反之則否。. 所以,你的例子是錯誤的,你可以改成。. #script2. export PORT=Linux. echo $PORT. #end of file. ==================. #script1. PORT=`./
(還有10個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者chiucs (ChiuCS)時間17年前 (2008/09/15 22:54), 編輯資訊
0
0
0
內容預覽:
think about. #1) 'export' to next script. #script2--------. export PORT=Linux. ./script1. #===============. #script1--------. echo $PORT. #===========
(還有171個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者wahoho (..)時間17年前 (2008/09/15 20:04), 編輯資訊
0
0
0
內容預覽:
如果現在有兩個script. script1和script2. 內容分別是. #script2. export PORT=Linux. #end of file. =============. #script1. ./script2. echo $PORT. #end of file. 請問有辦法讓
首頁
上一頁
1
下一頁
尾頁