dialog是在shell中实现图形化界面的一种方式,
#! /bin/sh
dialog --title "Question" --msgbox "welcom to our home" 9 18
dialog --title "good" --yesno "Are you coming?" 9 18
if [ $? != 0 ]
then
dialog --infobox "thank you anyway" 5 20
sleep 2
dialog --clear
exit 0
fi
示例2:
#! /bin/sh
dialog --title "name input" --inputbox "please input your name" 9 30 2> 1.txt
cat 1.txt
本文介绍了一种在Shell环境中创建基本图形用户界面的方法:使用dialog工具。通过几个示例展示了如何显示消息框、获取用户输入等操作。
4516

被折叠的 条评论
为什么被折叠?



