Sponsored Content
Full Discussion: Interactive Array Menu
Top Forums Shell Programming and Scripting Interactive Array Menu Post 302219034 by Annihilannic on Monday 28th of July 2008 01:48:36 AM
Old 07-28-2008
No need to 'dump' the values since you already have all of them loaded in the array, you can just calculate the current page offset, (say 10 for the second page), and just display items 11-20 in the array for that page.

Your code looks fine so far, what part are you having difficulty with?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Interactive menu

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)
Discussion started by: Klashxx
0 Replies

2. Shell Programming and Scripting

Menu help with array selection

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)
Discussion started by: draco
6 Replies

3. Homework & Coursework Questions

Help with Interactive / Non Interactive Shell script

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)
Discussion started by: rits
1 Replies

4. Homework & Coursework Questions

How to write script that behaves both in interactive and non interactive mode

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)
Discussion started by: rits
8 Replies

5. Shell Programming and Scripting

Execute interactive bash menu script in browser with PHP

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)
Discussion started by: nck
1 Replies

6. Red Hat

Interactive PXE Boot Menu

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)
Discussion started by: ceb
7 Replies

7. Shell Programming and Scripting

Dialog menu with array

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)
Discussion started by: dan007255
1 Replies

8. Homework & Coursework Questions

Dialog menu with array

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)
Discussion started by: dan007255
1 Replies

9. Shell Programming and Scripting

Passing positioning array as whiptail -- menu option

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)
Discussion started by: annacreek
1 Replies

10. UNIX for Beginners Questions & Answers

Gnome 3.28.3 menu item dissapears under the system menu

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
ARRAY_MERGE_RECURSIVE(3)						 1						  ARRAY_MERGE_RECURSIVE(3)

array_merge_recursive - Merge two or more arrays recursively

SYNOPSIS
array array_merge_recursive (array $array1, [array $...]) DESCRIPTION
array_merge_recursive(3) merges the elements of one or more arrays together so that the values of one are appended to the end of the previ- ous one. It returns the resulting array. If the input arrays have the same string keys, then the values for these keys are merged together into an array, and this is done recur- sively, so that if one of the values is an array itself, the function will merge it with a corresponding entry in another array too. If, however, the arrays have the same numeric key, the later value will not overwrite the original value, but will be appended. PARAMETERS
o $array1 - Initial array to merge. o $... - Variable list of arrays to recursively merge. RETURN VALUES
An array of values resulted from merging the arguments together. EXAMPLES
Example #1 array_merge_recursive(3) example <?php $ar1 = array("color" => array("favorite" => "red"), 5); $ar2 = array(10, "color" => array("favorite" => "green", "blue")); $result = array_merge_recursive($ar1, $ar2); print_r($result); ?> The above example will output: Array ( [color] => Array ( [favorite] => Array ( [0] => red [1] => green ) [0] => blue ) [0] => 5 [1] => 10 ) SEE ALSO
array_merge(3), array_replace_recursive(3). PHP Documentation Group ARRAY_MERGE_RECURSIVE(3)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy