First attempt to use Bash Dialog for user interaction. Guides user collecting metadata for scanning a documents.
- linuxcommand.org: dialog
- Manpage dialog
- Linux Gazette: Designing Simple front ends with dialog/Xdialog
- linux-community: mehr Komfort mit Dialog
- Dialog
buildlist
Beispiel - Dialog Script-Beispiele
- UbuntuUsers: Dialog Bash GUI
- UbuntuUsers: Dialog-Optionen
- Rheinwerk: Dialog
- Wikipedia: Zeichenorientierte Benutzerschnittstelle
Button / Taste | Exit-Code ($? ) |
RETURN-Value |
---|---|---|
OK | 0 | value |
Yes | 0 | - |
No | 1 | - |
Cancel | 1 | - |
<Ctrl> + C |
1 | - |
Help | 2 | HELP value |
Extra | 3 | value |
<ESC> |
255 | - |
--exit-label string
--default-button string --> ok, yes, cancel, no, help, extra
--extra-button
--extra-label string
--help-button
--help-label string
--no-cancel
--no-label string
--no-ok
--ok-label
--yes-label
# create a backup copy of file descriptor 1 (STDOUT) on descriptor 3
#exec 3>&1
# Generate the dialog box
ANSWER=$($DIALOG ... \
2>&1 1>&3 )
# Get the exit status
DIALOG_EXIT_STATUS=$?
# Close file descriptor 3
exec 3>&-
echo "${ANSWER}"
# Generate the dialog box
ANSWER=$($DIALOG ... \
3>&1 1>&2 2>&3 )
# Get the exit status
DIALOG_EXIT_STATUS=$?
echo "${ANSWER}"