0

I am new to UNIX and tried to create automation script as per my requirement but stuck up in the middle.please help on this.

Requirement:

 directory /usr/ab/bc contains two menus as test and test1. 

currently doing manual as go to the directory /usr/ab/bc and type menu test and then test1

test and test1 contains options as:

a-activity query b-access logs c-console logs q-Quit 

then type option (a) which will call abc.sh script then type option (b) which will call act.sh and so on.. but my requirement is it possible to get the menus from the directory /usr/ab/bc then execute one by one like first test menu and test1 menu and run the menu options sequentially which will call the corresponding shell script.

code which I tried:

 while true do clear echo "Menu" echo "a- Run Activity Query:" echo "b- Parse Access Logs:" echo "c-Parse Console Logs:" echo "d- Access Logs:" echo "q-Quit:" read answer case $answer in a) cd /xx/yy/tt/cmd/ sh ./act.sh break ;; b) cd /xx/yy/tt/cmd/ sh ./bct.sh uuu break ;; c) cd /xx/yy/tt/cmd/ sh ./cty ttt break ;; q) Quit ;; esac done done 

Thanks in advance please help on this

    1 Answer 1

    0

    My experience is sad using tools seem : Whiptail or dialog is better for making menu

    For more info see:

    https://en.m.wikibooks.org/wiki/Bash_Shell_Scripting/Whiptail

    For dialog :

    http://linuxcommand.org/lc3_adv_dialog.php

      You must log in to answer this question.

      Start asking to get answers

      Find the answer to your question by asking.

      Ask question

      Explore related questions

      See similar questions with these tags.