📄 00000001.htm
字号:
[foxman@foxman dialog]# dialog --title "Installation" --backtitle <BR> <BR> "Star Linux" --gauge "Linux Kernel" 10 60 50 <BR> <BR> <BR> <BR> gauge widget在启动後,会从stdin读取percent进来,读到EOF时结束。 <BR> <BR> <BR> <BR> 配合Shell Script进阶使用 <BR> <BR> <BR> 单单知道每个功能如何使用是还不够的,一般您要需要知道如何配合Script来 <BR> <BR> 使用。 <BR> <BR> 会需要互动的有yesno、inputbox、menu、checklist、radiolist、gauge。 <BR> <BR> <BR> yesno <BR> <BR> <BR> 范例 <BR> <BR> #!/bin/sh <BR> <BR> <BR> DIALOG=dialog <BR> <BR> <BR> if $DIALOG --title "WCW v.s. NWO" --backtitle "Wrestling"\ <BR> <BR> --yesno "Are you ready to rumble?" 5 60; then <BR> <BR> echo "Yeahhhhh" <BR> <BR> else <BR> <BR> echo "Nap..." <BR> <BR> fi <BR> <BR> <BR> inputbox <BR> <BR> <BR> 范例 <BR> <BR> #!/bin/sh <BR> <BR> <BR> DIALOG=dialog <BR> <BR> <BR> if $DIALOG --title "The future is here" \ <BR> <BR> --inputbox "Where do you want to go tomorrow?" \ <BR> <BR> 10 75 "Penguin" 2>my_own_destiny <BR> <BR> then <BR> <BR> way=`cat my_own_destiny` <BR> <BR> echo "My way is $way" <BR> <BR> else <BR> <BR> echo "freak out" <BR> <BR> fi <BR> <BR> <BR> menu <BR> <BR> <BR> #!/bin/sh <BR> <BR> <BR> if dialog --title "title" \ <BR> <BR> --menu "MENU" 20 60 14 \ <BR> <BR> tag1 "item1" tag2 "item2" 2>select <BR> <BR> then <BR> <BR> selection=`cat select` <BR> <BR> echo "my selection is $selection" <BR> <BR> else <BR> <BR> echo "go" <BR> <BR> fi <BR> <BR> <BR> checklist <BR> <BR> <BR> #!/bin/sh <BR> <BR> <BR> if dialog --title "title" \ <BR> <BR> --checklist "checklist" 20 60 14 \ <BR> <BR> tag1 "item1" on tag2 "item2" off 2>select <BR> <BR> then <BR> <BR> selections=`cat select` <BR> <BR> <BR> echo "My selections are:" <BR> <BR> for i in $selections ; do <BR> <BR> echo $i <BR> <BR> done <BR> <BR> <BR> else <BR> <BR> echo "go" <BR> <BR> fi <BR> <BR> <BR> radiolist <BR> <BR> <BR> #!/bin/sh <BR> <BR> <BR> if dialog --title "title" \ <BR> <BR> --radiolist "checklist" 20 60 14 \ <BR> <BR> tag1 "item1" on tag2 "item2" off 2>select <BR> <BR> then <BR> <BR> selection=`cat select` <BR> <BR> echo "My selection is $selection" <BR> <BR> else <BR> <BR> echo "go" <BR> <BR> fi <BR> <BR> <BR> gauge <BR> <BR> <BR> 到目前为止,gauge似乎都一直有点问题,文件上也写说是有点问题,所附的范 <BR> <BR> 例程式也是无法使用,不建议您使用(我自己也玩不出来,你如果有试出来,请 <BR> <BR> 来信告诉我)。 <BR> <BR> <BR> <BR> OK STATION, Webmaster, Brian Lin <BR> <BR> <BR> <BR> <BR>-- <BR>在江湖中,只要拿起了刀,就是一场无涯的梦。 <BR> <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 159.226.21.168] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -