Skip to content

First attempt to use Bash Dialog for user interaction. Guides user collecting metadata for scanning a documents.

License

Notifications You must be signed in to change notification settings

marctrommen/dialogs4docmetadata

Repository files navigation

dialogs4docmetadata

First attempt to use Bash Dialog for user interaction. Guides user collecting metadata for scanning a documents.

MIT License Linux Bash 4

Links

Exit-Codes

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

Umlekung der File-Deskriptoren

Alternative 1: exec

# 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}"

Alternative 2: redirection

# Generate the dialog box
ANSWER=$($DIALOG ... \
    3>&1 1>&2 2>&3 )

# Get the exit status
DIALOG_EXIT_STATUS=$?

echo "${ANSWER}"

About

First attempt to use Bash Dialog for user interaction. Guides user collecting metadata for scanning a documents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages