Shell腳本的執行,先找環境變量ENV,如:
1. cat /etc/profile //全局環境變量,腳本執行之前,先找這個環境變量
2. cat /etc/.bashrc
3. sh test.sh
/bin/bash test.sh
source test.sh
. test.sh
source 或者 點(.) 執行一個腳本更加強大,可以獲取腳本中自定義的內容。
可以查看 /etc/init.d/nfs
Shell腳本的執行,先找環境變量ENV,如:
1. cat /etc/profile //全局環境變量,腳本執行之前,先找這個環境變量
2. cat /etc/.bashrc
3. sh test.sh
/bin/bash test.sh
source test.sh
. test.sh
source 或者 點(.) 執行一個腳本更加強大,可以獲取腳本中自定義的內容。
可以查看 /etc/init.d/nfs