Re: [問題] export 指令使用問題
於 西元2012年06月27日 22:34, shihyuyao 提到:
> #! /usr/bin/sh
> export PATH=/home/yshihyu/armgdb:$PATH
> sh test.sh 執行沒有改變
> 必須再shell console 下
> export PATH=/home/yshihyu/armgdbPATH 才可以成功?
> 寫成 script 的export 不可以嗎?
你要用 source:
.. ./test.sh
來繼承子程序環境變數。
詳見:
http://mindream.wang.blog.163.com/blog/static/2325122220084624318692/
--
⊙翱翔青空.傲視大地⊙
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
5
16
Linux 近期熱門文章
PTT數位生活區 即時熱門文章