shell參數使用* - Linux

By Linda
at 2011-10-29T13:34
at 2011-10-29T13:34
Table of Contents
舉例:參數為aa*
myscript aa*
bash會自動搜尋目錄下符合aa*的檔案或資料夾,然後展開
所以在myscript中取得的參數不是aa*
我試過 myscript 'aa*' 或是 myscript "aa*"
但是結果都很奇怪,這問題有方法可以避開嗎?
--
myscript aa*
bash會自動搜尋目錄下符合aa*的檔案或資料夾,然後展開
所以在myscript中取得的參數不是aa*
我試過 myscript 'aa*' 或是 myscript "aa*"
但是結果都很奇怪,這問題有方法可以避開嗎?
--
Tags:
Linux
All Comments

By Bennie
at 2011-11-03T06:28
at 2011-11-03T06:28

By Oscar
at 2011-11-03T11:45
at 2011-11-03T11:45

By Faithe
at 2011-11-04T23:34
at 2011-11-04T23:34

By Freda
at 2011-11-06T07:37
at 2011-11-06T07:37

By Sierra Rose
at 2011-11-09T18:32
at 2011-11-09T18:32

By Ina
at 2011-11-10T13:39
at 2011-11-10T13:39

By Ida
at 2011-11-13T07:42
at 2011-11-13T07:42

By Lucy
at 2011-11-14T06:57
at 2011-11-14T06:57
Related Posts
Build code server的選擇?

By Hamiltion
at 2011-10-29T10:34
at 2011-10-29T10:34
truncate 指令

By Audriana
at 2011-10-29T00:00
at 2011-10-29T00:00
shell語法< <

By Ophelia
at 2011-10-28T23:55
at 2011-10-28T23:55
一台主機做NAT+DHCP

By Ula
at 2011-10-28T23:11
at 2011-10-28T23:11
請問我剛裝了wubi的ubuntu11.04

By Oliver
at 2011-10-28T18:04
at 2011-10-28T18:04