AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  Dialog menu on shell script (AIX)

    Posted Mon August 23, 2010 04:03 PM

    Originally posted by: tad_cs


    Hi all,

    I would like to know if it is possibile run "dialog" tool
    on shell script on AIX uxitip98.

    I can use the following shell script on linux:



    OPT=$( dialog --stdout --title "Test menu linux" \
    --menu "Choice a option" 12 70 3 \
    1 "Execute Backup" \
    2 "Execute Restore" )

    if $OPT = 1 ; then

    clear

    dialog --msgbox "Test message" 0 0

    fi


    How can I do this on Unix AIX?

    Thank you very much!!!!
    #AIX-Forum


  • 2.  Re: Dialog menu on shell script (AIX)

    Posted Thu August 26, 2010 02:23 PM

    Originally posted by: alethad


    I am not familiar with the dialog tool.
    Can you use something like this case statement?
    If the $OS_NAME is anything other than AIX or HP then the echo statement is performed.


    1. Setup for specific platform AIX HP
    case $OS_NAME in
    AIX) : ;;
    HP-UX) export LANG=C;;
    *) echo "I don't know about this OS ($OSNAME)"; exit 23;;
    esac


    Or are you looking for a visible menu rather than a passed variable? If so you can make a few adjustments to this by adding some echo statements to get a visible menu.
    You weren't specific enough in what you are looking for.

    good luck.
    #AIX-Forum


  • 3.  Re: Dialog menu on shell script (AIX)

    Posted Thu August 26, 2010 03:09 PM

    Originally posted by: Kosala


    If you google for it, the first hit says dialog was ported to AIX. May be you should try compiling it. Note, you'll need ncurses IINM for dialog to work.

    Kosala
    #AIX-Forum


  • 4.  Re: Dialog menu on shell script (AIX)

    Posted Thu August 26, 2010 07:46 PM

    Originally posted by: SystemAdmin


    You would get better results with ncurses, but it should work with AIX curses.
    (AIX curses has some limitations regarding color and line-drawing which may
    be troublesome).
    #AIX-Forum