2013-11-02 34 views
0

我曾嘗試:的zsh:如何遍歷與星號文件(`BLA - * zip`)

for f in bla-*.zip; do ... done 

和:

for f (bla-*.zip) { ... } 

在這兩種情況下,我得到的錯誤:no matches found 。沒有這樣的文件存在,所以當然沒有找到任何匹配,但我怎麼能讓它在這種情況下工作?

回答

1

我找到了解決方案(here)。我可以這樣做:

for f in bla-*.zip(N); do ... done