承上,
感謝CP64的解說,所以說萬用字元*會在有參數的script執行中轉譯2次?
接下來就跟萬用字元有關的問題,如下圖:
ls c* 就是列出 c開頭的檔案,所以得到 cccc. command.sss
ls c\* 因為*被 \ escape掉了,所以列出叫 c* 的檔案,但是沒有叫 c* 的檔案,
所以顯示 c*: No such file or directory
find . -name c\* 應該也要顯示 No such file or directory ?
為何可以找到./cccc.
./command.sss
http://i65ynb.2fh.co/pics/wildc.jpg
--
感謝CP64的解說,所以說萬用字元*會在有參數的script執行中轉譯2次?
接下來就跟萬用字元有關的問題,如下圖:
ls c* 就是列出 c開頭的檔案,所以得到 cccc. command.sss
ls c\* 因為*被 \ escape掉了,所以列出叫 c* 的檔案,但是沒有叫 c* 的檔案,
所以顯示 c*: No such file or directory
find . -name c\* 應該也要顯示 No such file or directory ?
為何可以找到./cccc.
./command.sss
http://i65ynb.2fh.co/pics/wildc.jpg

--
All Comments