自動取得腳本(shell script)的引數 - Linux

Table of Contents

hi all,
語言 : shell script
需求 : 我想把所有用在script上的參數, 寫到一個file裡面,
在執行script 的時候, 的時候, 可以讀file裡面的參數,
然後再帶入script 裡面.
問題 : 1. 我可以在執行script的前, 用 cat 和?? 簡單的指令, 來完成這件事情

2. 還是一定要在script 裡面, 讀file, 然後在parse file 的內容

Thanks for you guys reading.

BRs,
GG

--

All Comments

Emily avatarEmily2014-03-05
要在script裡讀才能使用吧?
Olivia avatarOlivia2014-03-08
YOUR_SCRIPT `cat YOUR_FILE` << 這樣?
Kelly avatarKelly2014-03-11
樓上的高手. 謝拉
Lydia avatarLydia2014-03-13
用 . 讀進來就可以了
或 source