Sponsored Content
Top Forums Shell Programming and Scripting Multi Dimensional array in KSH Post 302269899 by sinpeak on Friday 19th of December 2008 03:02:37 AM
Old 12-19-2008
Multi Dimensional array in KSH

Is there any way to use multi dim. array in KSH ?
sinpeak
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can there be multi-dimensional variable arrays in borne shell?

Hello - I've serached the web but can't find much on array script variables (except that C-shell variables are arrays!) I'm trying to form a 2-D string array: (this is what I want, but in java) String list = { {"one", "two"}, {"three"} }; I know this is a 1-D string array shell... (4 Replies)
Discussion started by: jparker
4 Replies

2. Programming

Multi-Dimensional Arrays

So, I'm fooling around with multi demtional arrays, and I made this in a short amount of time: #include <stdio.h> main(int argc, char *argv) { char blah = { {'a', 'b'}, {'b', 'a'} }; int i = 0; while (i < 2) { if (argv == blah) printf("%c\n", blah); i++; } } The goal... (3 Replies)
Discussion started by: Octal
3 Replies

3. Shell Programming and Scripting

Manipulating Pick multi dimensional data with awk.

Hi. I am reasonably new to awk, but have done quite a lot of unix scripting in the past. I have resolved the issues below with unix scripting but it runs like a dog. Moved to awk for speed and functionality but running up a big learning curve in a hurry, so hope there is some help here. I... (6 Replies)
Discussion started by: mike.strategis
6 Replies

4. Shell Programming and Scripting

PHP: how can I delete empty/NULL elements from a multi-dimensional array.

Hi all I have a file that i'm running and exec(cat ./dat) against..and putting its contents into any array, then doing an exploding the array into a multi-dimension array... The 15 multi-dimensional arrays have elements that are null/empty, I would like to remove/unset these elements and then... (2 Replies)
Discussion started by: zeekblack
2 Replies

5. Shell Programming and Scripting

PHP: Search Multi-Dimensional(nested) array and export values of currenly worked on array.

Hi All, I'm writing a nagios check that will see if our ldap servers are in sync... I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable so...eg...let take the single array... (1 Reply)
Discussion started by: zeekblack
1 Replies

6. Shell Programming and Scripting

Match elements in an AWK multi-dimensional array

Hello, I have two files in the following format; file1: A B C D E F G H I J K L file2: 1 2 3 4 5 6 7 8 9 10 11 12 I have read them both in to multi-dimensional arrays. I need a file that has column 2 of the first file printed out for each column 3 of the second file ie... ... (3 Replies)
Discussion started by: cold_Que
3 Replies

7. Shell Programming and Scripting

sorting multi dimensional array

Hi there, Can someone let me know how to sort the 2 dimensional array below by column 1 then by column 2? 22 55 2222 2230 33 66 44 58 222 240 11 25 22 60 33 45 output: 11 25 22 55 22 60 33 45 33 66 44 58 (6 Replies)
Discussion started by: phoeberunner
6 Replies

8. UNIX for Dummies Questions & Answers

Help: stdin to multi-dimensional array

I cant get out of this while loop at the beginning of my program. Just reading from stdin one char at a time and storing it into a multi-array. Need to fix it with in two hours. #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include... (1 Reply)
Discussion started by: unt_engn
1 Replies

9. Shell Programming and Scripting

Multi Dimensional array

I have an array of names. Each one of the name, has a number represented to it. For example A has an ID 8, B has an ID 2. What I am after is a for loop that when the array is in position 1, a particular variable is set to the value of position 1 in array 2 declare -a arr=("A" "B" "C"... (6 Replies)
Discussion started by: nms
6 Replies

10. Shell Programming and Scripting

Multi Dimensional array in bash

Hi, I'm developing a script which contains a multi dimensional array, however for some reason the array is not iterating. When executing the script, services are listed as arguments from argument 2. Ex voice data sms. service=${@:2}; for services in $service do ... (2 Replies)
Discussion started by: nms
2 Replies
M-ANLZ(4)						     Kernel Interfaces Manual							 M-ANLZ(4)

NAME
m-anlz - Analyze (SPM) medical image format (MedCon) DESCRIPTION
This is a very simple format. The basic headers are written in one file with extension `.hdr', the image data in another file with extension `.img'. The basic defines for the format: --------------------------------------------------------------------------- typedef struct Header_Key_t{ Int32 sizeof_hdr; /* 348 or 148 */ char data_type[10]; /* "dsr" */ char db_name[18]; /* filename without extension */ Int32 extents; /* 16384 */ Int16 session_error; char regular; /* 'r' */ char hkey_un0; } MDC_ANLZ_HEADER_KEY; #define MDC_ANLZ_HK_SIZE 40 typedef struct Image_Dimensions_t{ Int16 dim[8]; /* [0] = # of dimensions */ /* [1] = X-dim */ /* [2] = Y-dim */ /* [3] = Z-dim */ /* [4] = t-dim */ /* ... */ Int16 unused[7]; Int16 datatype; /* pixel type */ /* 0 = Unknown 1 = one-bit */ /* 2 = Uint8 4 = Int16 */ /* 8 = Int32 16 = float */ /* 32 = complex 64 = double */ /*128 = RGB 255 = all */ Int16 bitpix; /* bits per pixel */ Int16 dim_un0; float pixdim[8]; /* [0] = # of dimensions */ /* [1] = X-dim (mm) */ /* [2] = Y-dim (mm) */ /* [3] = Z-dim (mm) */ /* [4] = t-dim (ms) */ /* ... */ float funused[6]; float compressed; float verified; Int32 glmax,glmin; } MDC_ANLZ_IMAGE_DIMS; #define MDC_ANLZ_IMD_SIZE 108 typedef struct Data_History_t{ char descrip[80]; char aux_file[24]; char orient; /* patient orientation */ /* 0 = transverse unflipped */ /* 1 = coronal unflipped */ /* 2 = sagittal unflipped */ /* 3 = transverse flipped */ /* 4 = coronal flipped */ /* 5 = sagittal flipped */ char originator[10]; char generated[10]; char scannum[10]; char patient_id[10]; char exp_date[10]; char exp_time[10]; char hist_un0[3]; Int32 views; Int32 vols_added; Int32 start_field; Int32 field_skip; Int32 omax, omin; Int32 smax, smin; } MDC_ANLZ_DATA_HIST; #define MDC_ANLZ_DH_SIZE 200 --------------------------------------------------------------------------- The structures are defined in the order as they should be found in the file. The Data_History header is not obliged. The SPM Analyze format, intended for the SPM software, differs a little from the normal Analyze format. What does the format support or not support: =========================================================================== Item Supported Not Supported =========================================================================== Color Map : grayscale - File Endian : little & big - Pixeltypes : 1-bit, Uint8, Int16, Int32 Int8,Uint16,Uint32 float, double, (complex) Int64,Uint64 =========================================================================== Scaling factors : quantify & calibrate factors/image are NOT supported --------------------------------------------------------------------------- Dimensions/Image : different dimensions for each image are NOT supported --------------------------------------------------------------------------- Pixeltypes/Image : different pixeltypes for each image are NOT supported --------------------------------------------------------------------------- SPM remarks : 1) imd.funused[0] = the offset 2) imd.funused[1] = one global scaling factor 3) (Int16)dh.originator[0...1] (Int16)dh.originator[2...3] } = origin (X, Y, Z) (Int16)dh.originator[4...5] / =========================================================================== NOTES
A note about the image (patient) orientation in SPM: X-axis increases from leftside (hand) to rightside (hand). Y-axis increases from posterior (back) to anterior (front). Z-axis increases from inferior (feet) to superior (head). FILES
/usr/local/xmedcon/source/m-anlz.h The header file. /usr/local/xmedcon/source/m-anlz.c The source file. SEE ALSO
medcon(1), xmedcon(1), xmedcon-config(1) m-acr(4), m-gif(4), m-inw(4), m-intf(4), m-ecat(4) medcon(3) AUTHOR
(X)MedCon project was originally written by Erik Nolf (eNlf) for the former PET-Centre at Ghent University (Belgium). e-mail: enlf-at-users.sourceforge.net www: http://xmedcon.sourceforge.net M-ANLZ(4)
All times are GMT -4. The time now is 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy