2017-05-03 79 views
1

我想列出所有的find結果,但它將所有結果作爲一個選項。如何使每個結果不同選項選擇並存儲在CHOICEZenity list found results

CHOICE=$(zenity --list --title "Choose file:" --column=Files "$(find $DIRECTORY -name "*.cpp")") 

回答

1

太多報價:

zenity --list --title "Choose file:" --column=Files $(find $DIRECTORY -name "*.h") 

各地"$(find)"雙引號使結果很長文件名,而不是當你想用文字分裂,使他們單獨的文件。請注意,您將遇到包含空格的文件名問題。