Sponsored Content
Top Forums Shell Programming and Scripting How to automate user menu selections? Post 302954773 by Don Cragun on Thursday 10th of September 2015 09:22:39 PM
Old 09-10-2015
Code:
printf 'Response to select 1st menu option\nResponse to select submenu option\n' | script_name

How do you run the script with the menu options if you can't read it?
 

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
mitem_value(3X) 														   mitem_value(3X)

NAME
mitem_value - set and get menu item values SYNOPSIS
#include <menu.h> int set_item_value(ITEM *item, bool value); bool item_value(const ITEM *item); DESCRIPTION
If you turn off the menu option O_ONEVALUE (e.g., with set_menu_opts or menu_opts_off; see menu_opts(3X)), the menu becomes multi-valued; that is, more than one item may simultaneously be selected. In a multi_valued menu, you can used set_item_value to select the given menu item (second argument TRUE) or deselect it (second argument FALSE). RETURN VALUE
The function set_item_value returns one of the following: E_OK The routine succeeded. E_SYSTEM_ERROR System error occurred (see errno). E_REQUEST_DENIED The menu driver could not process the request. 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. mitem_value(3X)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy