首页 > 解决方案 > 在 Linux 中使用对话框获取选定目录

问题描述

我想在对话框中获取选定的目录。 在此处输入图像描述

我需要打印 /home/lurdes/Destktop 这是所选文件夹。

dialog --title "text" --fselect ../ 
FILE=$(dialog --stdout --title "Please choose a file" --fselect $HOME/ 14 48)
echo "${HOME} file chosen."

我怎样才能做到这一点?我只被允许使用对话框。

标签: linuxbashubuntuuser-interfacedialog

解决方案


推荐阅读