Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么这段代码在 Bash 中不起作用?
whiptail --infobox "My Text" 0 0
手册指出:
whiptail --infobox text height width
那么有什么问题呢?
由于一个错误,--infoboxwhiptail 中的选项在(即 gnome 终端)中不起作用xterm。但是,它确实可以在常规控制台上运行。
--infobox
xterm
这似乎是一个长期存在的错误,在报告时已被视为不可重现。
最近,它再次在Launchpad中被报道。
如果你需要一个工作--infobox,xterm你可以使用dialog.
dialog
绝对看起来像一个错误。
我认为它必须保存屏幕,显示框,然后再次清除屏幕(如“less <filename>”) - 如果通过“cat -v”之类的管道输出,您可以看到输出。
我认为 vt220 与 xterm 非常相似,因此解决方法是:
TERM=vt220 whiptail --infobox "My Text" 0 0