Sponsored Content
Top Forums Shell Programming and Scripting How to automate user menu selections? Post 302954767 by gerry8a on Thursday 10th of September 2015 08:12:56 PM
Old 09-10-2015
Hammer & Screwdriver How to automate user menu selections?

Hello all, I am sort of new to Shell programming and to this forum. I want to create a script that auto selects menu options.

lets say I have a menu.

MAIN MENU
1.) opt1
2.)opt2
3.)opt3

I want the script to automatically select option 1.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Presenting the user a menu in Bash ...

Hello, I am trying to write a bash script function to present the user a menu of options. The following is what I have so far: function MainMenu { while ] do echo "--------------------------------------------------------------------------------" echo... (4 Replies)
Discussion started by: ckoeber
4 Replies

2. Shell Programming and Scripting

menu selections

I am trying to find a way to allow users to select multiple options in a shell menu. I am using case and it gives menu options 1-9, how can I set this up so that it give the user the ability to choose more then one option, ie 1,2 or 3,4,5, etc... (4 Replies)
Discussion started by: lwif
4 Replies

3. Shell Programming and Scripting

How to automate user's inputs.

Hi Friends, I am wrinting a shell script MorningChecks.sh which will call another script StartServer.sh. But the latter script requires user's inputs to complete. I want to automate this. So can you please let me how this can be achieved? Any help would be highly appereciated. ... (3 Replies)
Discussion started by: singh.chandan18
3 Replies

4. UNIX for Advanced & Expert Users

Can we Automate the User creation and setting password through a script in solaris 10

Hi, I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool. Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies

5. Shell Programming and Scripting

How to automate user selection options in shell script?

Hi There, I am trying to write a script which has to pick the prompted options by itself(i mean option to choose will be passed) here is real scenario i am trying to do. i have an executable(diagnos) which gets called in shell script, when the executable (diagnos) runs i get following as... (8 Replies)
Discussion started by: sairam_9191
8 Replies

6. Shell Programming and Scripting

Automate the menu options using shell script

I have a menu option which will look as follows Select a menu option 1.change password 2.login as root user 3.show system version 4.quit Select> 1 please enter the new password: unix reenter the new password: unix press any key to enter (then displays again the menu options to enter the... (4 Replies)
Discussion started by: shivakumar6g
4 Replies

7. Shell Programming and Scripting

Display user selction from bash menu

I am trying to display the text the user selects from a bash menu. The below will display the menu and allow the user to enter a number, but will not display the choice selected. bash while true do printf "\n please make a selection from the MENU \n ... (4 Replies)
Discussion started by: cmccabe
4 Replies

8. Shell Programming and Scripting

How to do user-preset login to Bash shell then automate path modification?

How do a user login with full user-environment preset to Bash shell then automatically do path modification with few script codes, either on command-line or put it in a script file. what i tried: bash --login -c PATH="/ANewPath:${PATH}" bash --login -c 'PATH="/ANewPath:${PATH}"; export PATH'... (2 Replies)
Discussion started by: abdulbadii
2 Replies
menu_mark(3X)															     menu_mark(3X)

NAME
menu_mark - get and set the menu mark string SYNOPSIS
#include <menu.h> int set_menu_mark(MENU *menu, const char *mark); const char *menu_mark(const MENU *menu); DESCRIPTION
In order to make menu selections visible on older terminals without highlighting or color capability, the menu library marks selected items in a menu with a prefix string. The function set_menu_mark sets the mark string for the given menu. Calling set_menu_mark with a null menu item will abolish the mark string. Note that changing the length of the mark string for a menu while the menu is posted is likely to produce unhelpful behavior. The default string is "-" (a dash). Calling set_menu_mark with a non-NULL menu argument will change this default. The function menu_mark returns the menu's mark string (or NULL if there is none). RETURN VALUE
The function menu_mark returns a pointer (which may be NULL). It does not set errno. The function set_menu_mark may return the following error codes: E_OK The routine succeeded. E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. E_SYSTEM_ERROR System error occurred (see errno). SEE ALSO
curses(3X), menu(3X). NOTES
The header file <menu.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. menu_mark(3X)
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy