如何在已构建的bash scode中放置/使用对话框

如何在已构建的bash scode中放置/使用对话框,bash,shell,ubuntu,dialog,Bash,Shell,Ubuntu,Dialog,我有一个用bash编写的源代码,我需要使用dialog来创建终端GUI。我的bash代码有菜单和子菜单。 我有这段代码,我试图使用对话框,但当我试图从主菜单中选择时,什么都没有发生 INPUT=/tmp/projekt.txt while true ;do #a loop so this list will be used again, until the user presses x button dialog --backtitle "Welcome to MY utility" --ti

我有一个用bash编写的源代码,我需要使用dialog来创建终端GUI。我的bash代码有菜单和子菜单。 我有这段代码,我试图使用对话框,但当我试图从主菜单中选择时,什么都没有发生

INPUT=/tmp/projekt.txt
while true ;do #a loop so this list will be used again, until the user presses x button

dialog --backtitle "Welcome to MY utility" --title"======MAINMENU======="    --menu "Choices:" 20 50 10 \
 "A." " File operations" \
 "B." "Directory operations" \
 "C." " Process management" \
 "D." "Search operations" \
 "X." "Exit the program" 2>"${INPUT}"

choice=$(<"${INPUT}")

case $choice in

    Adialog --title "File operations" --menu "Choices:" 20 50 10 \
     "A." "Copy file" \
     "B." "Rename file" \
     "C." "Remove file" \
     "D." "Edit file" \
     "E." "Print file" \
     "X." "Return to main menu" 2>"${INPUT}" 
    choiceA=$(<"${INPUT}")


        case $choiceA in

            a)
            #a place for the functions
            functionAA
            ;;

            b)
            functionAB
            ;;

            c)
            functionAC
            ;;

            d)
            functionAD
            ;;

            e)
            functionAE
            ;;

            x)
            --infobox "Returning to main menu" 10 13; sleep 3; clear;; 
            ;;

                            *)
                            echo
                            echo -e "\e[91mNo option was reconized\e[0m" #Light red color, not exactly the same$
            echo
            echo "Returning to main menu"


        esac
        #done

    ;;

您可以使用或bash内置,我需要使用对话框来创建终端GUI。“GUI”一词可能并不是您所想的意思。@4ae1e1 GUI图形用户界面