Linux shell script to easily create Simple menu based scripts to help automate.
menuTitle <title> : Sets Heading of the menu addMenu
if string and action are not given then default is added. start : Starts the infinite loop: showMenu, promptInput, run actionsSample script below creates this menu and related handlers:
============================
News Manager
============================
2. Delete Group from db
1. Add Group to db
0. Exit
Please Select Menu [0 - 2]:
#! /bin/bash
#source this file
. ./menu.sh
#menu action function
function addGrpDb
{
echo "Code menu handler here"
}
#set menu heading
menuTitle "News Manager"
#add menus
addMenu "Add Group to db" addGrpDb
addMenu "Delete Group from db" delGrpDb
#Start the main loop
start