example
#!/bin/bash
dialog --title "경고: 파일삭제" --backtitle "제목" --yesno "문장" 7 60
var=$?
echo $var
# 0 - YES
# 1 - NO
#--------------------------------------------------------------------------------
dialog --inputbox "문장" 7 60 2> /tmp/input.$$
var=$?
echo $var
# 0 - 정상종료
# 1 - 취소
# 255 - ESC
cat /tmp/input.$$
rm -f /tmp/input.$$
#--------------------------------------------------------------------------------
dialog --radiolist "문장" 15 25 3 1 "one" "off" 2 "two" "on" 3 "three" "off"
var=$?
echo $var
#--------------------------------------------------------------------------------
dialog --checklist "문장" 15 25 3 1 "one" "off" 2 "two" "on" 3 "three" "off"
var=$?
echo $var
cdialog (ComeOn Dialog!) version 1.1-20080819
Copyright 2000-2007,2008 Thomas E. Dickey
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* Display dialog boxes from shell scripts *
Usage: dialog <options> { --and-widget <options> }
where options are "common" options, followed by "box" options
Special options:
[--create-rc "file"]
Common options:
[--ascii-lines] [--aspect <ratio>] [--backtitle <backtitle>]
[--begin <y> <x>] [--cancel-label <str>] [--clear] [--colors]
[--column-separator <str>] [--cr-wrap] [--default-item <str>]
[--defaultno] [--exit-label <str>] [--extra-button]
[--extra-label <str>] [--help-button] [--help-label <str>]
[--help-status] [--ignore] [--input-fd <fd>] [--insecure]
[--item-help] [--keep-tite] [--keep-window] [--max-input <n>]
[--no-cancel] [--no-collapse] [--no-kill] [--no-label <str>]
[--no-lines] [--no-ok] [--no-shadow] [--nook] [--ok-label <str>]
[--output-fd <fd>] [--output-separator <str>] [--print-maxsize]
[--print-size] [--print-version] [--quoted] [--separate-output]
[--separate-widget <str>] [--shadow] [--single-quoted] [--size-err]
[--sleep <secs>] [--stderr] [--stdout] [--tab-correct] [--tab-len <n>]
[--timeout <secs>] [--title <title>] [--trace <file>] [--trim]
[--version] [--visit-items] [--yes-label <str>]
Box options:
--calendar <text> <height> <width> <day> <month> <year>
--checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...
--dselect <directory> <height> <width>
--editbox <file> <height> <width>
--form <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>...
--fselect <filepath> <height> <width>
--gauge <text> <height> <width> [<percent>]
--infobox <text> <height> <width>
--inputbox <text> <height> <width> [<init>]
--inputmenu <text> <height> <width> <menu height> <tag1> <item1>...
--menu <text> <height> <width> <menu height> <tag1> <item1>...
--mixedform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1> <itype>...
--mixedgauge <text> <height> <width> <percent> <tag1> <item1>...
--msgbox <text> <height> <width>
--passwordbox <text> <height> <width> [<init>]
--passwordform <text> <height> <width> <form height> <label1> <l_y1> <l_x1> <item1> <i_y1> <i_x1> <flen1> <ilen1>...
--pause <text> <height> <width> <seconds>
--progressbox <height> <width>
--radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...
--tailbox <file> <height> <width>
--tailboxbg <file> <height> <width>
--textbox <file> <height> <width>
--timebox <text> <height> <width> <hour> <minute> <second>
--yesno <text> <height> <width>
Auto-size with height and width = 0. Maximize with height and width = -1.
Global-auto-size if also menu_height/list_height = 0.
--ascii-lines 옵션을 사용하면
LANG=ko_KR.eucKR
LANG=ko_KR.UTF-8
언어환경에 관계없이 ASCII 코드로 된 화면을 볼 수 있습니다.
'programming > shell' 카테고리의 다른 글
uptime 결과에서 최근 5분간의 부하평균 값만 가져오기 (0) | 2012.04.27 |
---|---|
my bash PS1 (0) | 2012.04.27 |
문자열 공백제거 (0) | 2010.06.26 |
brace 사용 (0) | 2010.06.08 |
mail subject encoding (0) | 2010.05.21 |
Latest update: 2010. 8. 1. 13:52