This should be simple, but i haven't done it before...
KSH
I am reading a file into an array and currently displaying the values to the screen. What I need to do is to display a subset of those values, likely numbered, and prompt the user to select one. When they enter the number, it retrieves the assoicated array value and outputs it to the screen. (this will be used for more complex functions later)
For example, the program is run and the first 10 rows are displayed. I select a number or hit a character to proceed to the next page. This would dump the first 10 rows and load the next 10 (into another array?) I select a value and the row associated with that value echoes to the screen.
Any suggestions are greatly appreciated.
My code so far:
Last edited by gecko2424; 07-25-2008 at 10:48 AM..
Hi ,some time ago i did an interactive menu based on eval function for navigation , one of the post remind me it. I think it could be handy for others.
#!/usr/bin/ksh
keyRead ()
{
tput smso
echo "Enter option."
tput rmso
oldstty=$(stty -g)
stty -icanon -echo min 1 time 1
Answer=$(dd... (0 Replies)
Hi there all
I got the following
I got multiple arrays named for example
STAT_AAAA
STAT_AAAB
STAT_AAAC
STAT_AAAD
Now what I want I have chosen an option in a menu to select 1
but I dont want to write for all the same thing so I made it a signle one
now what I want is to get
STAT_ and... (6 Replies)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (1 Reply)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
I have an interactive menu script written in bash and I would like use PHP to open the interactive bash menu in a browser.
Is this possible?
Using the sytem() function in php runs the script but it's all garbled.
Seems like maybe a terminal window needs to be opened in php first?
... (1 Reply)
I have been asked to modify our PXE server such that there will be only one entry in the pxelinux.cfg/default file, where the same kernel and initrd.img will be used regardless of what operating system is to be installed, and the user will type in the path to the kickstart file that will be used. ... (7 Replies)
Hi
I'm currently making a schoolproject and I'm stuck with reading an array into the possible options of a menu dialog. What I mean is: I've put some values into an array, I want all these values from the array to be possible to be selected in the menu. Please help :)
I'm programming in Debian... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi
I'm currently making a schoolproject and I'm stuck with reading an array into the possible options of a... (1 Reply)
I may have asked this before, so forgive OF.
Problem:
I can pass positioning array as -- menu option to whiptail, but it does not show in the whiptail form as an array - only single (first member "lsusb" ) entry / line shows up.
Code:
DynamicEntry=$(whiptail \
--title "DEBUG... (1 Reply)
I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome.
Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies
LEARN ABOUT NETBSD
menu_post
MENU_POST(3) BSD Library Functions Manual MENU_POST(3)NAME
post_menu, unpost_menu -- post (draw) or unpost a menu
LIBRARY
Curses Menu Library (libmenu, -lmenu)
SYNOPSIS
#include <menu.h>
int
post_menu(MENU *menu);
int
unpost_menu(MENU *menu);
DESCRIPTION
The post_menu() function causes the menu to be drawn on the screen. Any functions defined by either set_menu_init() or set_item_init() (see
menu_hook(3)) are called before the menu is placed on the screen. The unpost_menu() does the opposite, it removes a menu from the screen.
Any functions defined by both set_menu_term() and set_item_term() (see menu_hook(3)) are called prior to the menu's removal.
RETURN VALUES
The functions return one of the following error values:
E_OK The function was successful.
E_SYSTEM_ERROR There was a system error during the call.
E_BAD_ARGUMENT One or more of the arguments passed to the function was incorrect.
E_POSTED The menu is already posted.
E_BAD_STATE The function was called from within an initialization or termination routine.
E_NO_ROOM The menu does not fit within the subwindow.
E_NOT_CONNECTED The item is not connected to a menu.
SEE ALSO curses(3), menu_hook(3), menus(3)NOTES
The header <menu.h> automatically includes both <curses.h> and <eti.h>.
BSD September 10, 1999 BSD