Sponsored Content
Full Discussion: multidimensional arrays
Top Forums Shell Programming and Scripting multidimensional arrays Post 302126841 by Shell_Life on Friday 13th of July 2007 11:32:42 AM
Old 07-13-2007
Leslie,
I do not know the reasons why you want to use two dimensional array,
but here is how you can access both variables:
Code:
while read mStr1
do
  read mStr2
  echo 'Str1 = '${mStr1}' Str2 = '${mStr2}
done < input_file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

multidimensional array in perl

i'm trying to open a file with three or more columns and an undetermined, but finite number of rows. I want to define an array for each row with each element of the row as a sub array. The columns are separated by tabs or spaces. Here's the file: 12x3.12z34b.342sd3.sds 454.23.23.232 ... (9 Replies)
Discussion started by: prkfriryce
9 Replies

2. Programming

multidimensional array using c++ vector

Hi! I need to make dynamic multidimensional arrays using the vector class. I found in this page How to dynamically create a two dimensional array? - Microsoft: Visual C++ FAQ - Tek-Tips the way to do it in 2D, and now i'm trying to expand it to 3D but i don't understand how is the operator working,... (0 Replies)
Discussion started by: carl.alv
0 Replies

3. Shell Programming and Scripting

multidimensional arrays using awk

i'm trying to use awk to count a listing similar to the following and get a report of the listing similar to the one below it. y,pizza n,pizza y,pizza y,pizza n,tomato n,tomato y,cheese y,cheese n,cheese report ---- pizza,3,1 tomato,0,2 cheese,2,1 (1 Reply)
Discussion started by: multimulti
1 Replies

4. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

5. Shell Programming and Scripting

multidimensional array in awk

Hi, I was trying to process a file with the help of awk. I want to first display all the rows that contains 01 and at the end of processing I have to print some portion of all the lines. like below. Output expected: (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies

6. Programming

Multidimensional arrays and sort.

My language is C++. I have a multidimensional vector that I would like to sort by a specific "cell" or "field" within the main vector. Does anyone have any information on how to do this? I have searched all over the internet and every reference manual I can find. So far I have found very little to... (2 Replies)
Discussion started by: sepoto
2 Replies

7. Programming

question about int arrays and file pointer arrays

if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies

8. Shell Programming and Scripting

Multidimensional arrays

Hi Experts, I'm a newbie.....multidimensional arrays in shell scripts is possible??? If so, can anyone guide me with an example.....and also can anyone tell me, how we can create a table like ouput format in shell script....the output should look like this one: 1 2 3 4 5 6 6 5 4 3... (4 Replies)
Discussion started by: kritibalu
4 Replies

9. Shell Programming and Scripting

Multidimensional arrays Shell Programming and Scripting

I have two files: file-1 is a list of number of interfaces in the switch and file-2 have VLAN-ID , VLAN-NAME , Interface belong to that VLAN like this: file-1: 1/1 1/2 1/3 1/4 1/5 . . file-2: 1,"vlan-wifi",1/1,1/7,1/8 (9 Replies)
Discussion started by: SULTAN01
9 Replies

10. Shell Programming and Scripting

Multidimensional array

I am learning about bash system variables, such as $ , @ and #. I have this piece of script implementing an array and it is doing its job just fine. This is not the only array I will be using. Just for ease of maintenance and more coding I would like to have the arrays in two dimensional... (4 Replies)
Discussion started by: annacreek
4 Replies
net_protocol_notify_register(9F)			   Kernel Functions for Drivers 			  net_protocol_notify_register(9F)

NAME
net_protocol_notify_register, net_instance_protocol_unregister - add/delete a function to be called for changes to a protocol SYNOPSIS
#include <sys/hook.h> #include <sys/neti.h> int net_protocol_notify_register(net_handle_t family, hook_notify_fn_t *callback, void *arg); int net_protocol_notify_unregister(net_handle_t family, hook_notify_fn_t *callback); typedef int (* hook_notify_fn_t)(hook_notify_cmd_t command, void *arg, const char *name1, const char *name2, const char *name3); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
family value returned from net_protocol_lookup(). callback function to call when a change occurs. arg pointer to pass into the callback() function when a change occurs. DESCRIPTION
The net_protocol_notify_register() function registers a function represented by the pointer callback to be called when there is a change to the protocol represented by family. The types of changes for which notifications are available for is currently limited to the addition and removal of protocols. The net_protocol_notify_unregister() function removes the function specified by the pointer callback from the list of functions to call. This call may fail if the specified function cannot be found. Multiple callback functions may be registered through this interface. The same set of parameters is passed to each callback function. The memory referenced through the pointers passed to the callback should be treated as pointing to read-only memory. Changing this data is strictly prohibited. The function that is called must not block any other protocols. The arguments passed through to the callback are as follows (the command is either HN_REGISTER or HN_UNREGISTER): name1 is the name of the protocol name2 is NULL. name3 is the name of the protocol being added/removed RETURN VALUES
If these functions succeed, 0 is returned. Otherwise, the following error is returned: EEXIST the given callback function is already registered. CONTEXT
These functions may be called from user or kernel context. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), net_protocol_lookup(9F) SunOS 5.11 30 Oct 2008 net_protocol_notify_register(9F)
All times are GMT -4. The time now is 07:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy