Sponsored Content
Full Discussion: Delimited File to 2D Array
Top Forums Shell Programming and Scripting Delimited File to 2D Array Post 302670583 by rbatte1 on Thursday 12th of July 2012 08:31:59 AM
Old 07-12-2012
What are you calling the awk with? Many shells only support single diminsion arrarys, i.e. a list. If you have few enough items, then you might get away with using a formula to convert your 2D plan into a single value that you can repeat the function with the function with to recall the data later, but there are limits to the number of elements you can have, e.g. ksh will support up to 1024 (depending how you interpret the rules and how you use it)

Could you tell us a bit more about what you have tried, what the purspose is and data volumes. It might suggest something or steer someone with an idea.


Robin
Liverpool/Blackburn
UK
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Tab delimited file to Comma delimited file in Unix

Hi, Can anyone let me know on how to convert a Tab delimited file to Comma delimited file in Unix Thanks!! (22 Replies)
Discussion started by: charan81
22 Replies

2. UNIX for Dummies Questions & Answers

Loading a comma Delimited file into an Array

Hello, I have been stuck on this aspect of loading a comma delimited file into an array. I thought i had the syntax right, but my commands are not working the way I want them to. Basically my cut command is splitting the file up by spaces and commas. I want the cut command to ignore white spaces.... (2 Replies)
Discussion started by: grandtheftander
2 Replies

3. UNIX for Dummies Questions & Answers

Converting Space delimited file to Tab delimited file

Hi all, I have a file with single white space delimited values, I want to convert them to a tab delimited file. I tried sed, tr ... but nothing is working. Thanks, Rajeevan D (16 Replies)
Discussion started by: jeevs81
16 Replies

4. Shell Programming and Scripting

convert a pipe delimited file to a':" delimited file

i have a file whose data is like this:: osr_pe_assign|-120|wg000d@att.com|4| osr_evt|-21|wg000d@att.com|4| pe_avail|-21|wg000d@att.com|4| osr_svt|-11|wg000d@att.com|4| pe_mop|-13|wg000d@att.com|4| instar_ready|-35|wg000d@att.com|4| nsdnet_ready|-90|wg000d@att.com|4|... (6 Replies)
Discussion started by: priyanka3006
6 Replies

5. Shell Programming and Scripting

how to read delimited text into array

I am trying to parse a string using delimited char into array. BNAME=B10,B20,B30 B10.Q=X B20.Q=Y B30.Q=Z I need to parsethe BNAME into array, then i will loop through array to execute command using these variables. like: for i in $array do qload array array.Q # execute command: qload B10... (3 Replies)
Discussion started by: adars1
3 Replies

6. Shell Programming and Scripting

How to convert a space delimited file into a pipe delimited file using shellscript?

Hi All, I have space delimited file similar to the one as shown below.. I need to convert it as a pipe delimited, the values inside the pipe delimited file should be as highlighted... AA ATIU2345098809 009697 005374 BB ATIU2345097809 005445 006518 CC ATIU9685098809 003215 003571 DD... (7 Replies)
Discussion started by: nithins007
7 Replies

7. Shell Programming and Scripting

Help with converting Pipe delimited file to Tab Delimited

I have a file which was pipe delimited, I need to make it tab delimited. I tried with sed but no use cat file | sed 's/|//t/g' The above command substituted "/t" not tab in the place of pipe. Sample file: abc|123|2012-01-30|2012-04-28|xyz have to convert to: abc 123... (6 Replies)
Discussion started by: karumudi7
6 Replies

8. Shell Programming and Scripting

awk read one delimited file, search another delimited file

Hello folks, I have another doozy. I have two files. The first file has four fields in it. These four fields map to different locations in my second file. What I want to do is read the master file (file 2 - 23 fields) and compare each line against each record in file 1. If I get a match in all four... (4 Replies)
Discussion started by: dagamier
4 Replies

9. Shell Programming and Scripting

How to make tab delimited file to space delimited?

Hi How to make tab delimited file to space delimited? in put file: ABC kgy jkh ghj ash kjl o/p file: ABC kgy jkh ghj ash kjl Use code tags, thanks. (1 Reply)
Discussion started by: jagdishrout
1 Replies

10. UNIX for Dummies Questions & Answers

Need to convert a pipe delimited text file to tab delimited

Hi, I have a rquirement in unix as below . I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column. ex: Input Text file: 1|A|apple 2|B|bottle excel file to be generated as output as... (9 Replies)
Discussion started by: raja kakitapall
9 Replies
JE::Object::Array(3pm)					User Contributed Perl Documentation				    JE::Object::Array(3pm)

NAME
JE::Object - JavaScript Array object class SYNOPSIS
use JE; use JE::Object::Array; $j = new JE; $js_array = new JE::Object::Array $j, 1, 2, 3; $perl_arrayref = $js_array->value; # returns [1, 2, 3] $js_array->[1]; # same as $js_array->value->[1] "$js_array"; # returns "1,2,3" DESCRIPTION
This module implements JavaScript Array objects. The "@{}" (array ref) operator is overloaded and returns a tied array that you can use to modify the array object itself. The limitations and caveats mentioned in "JE::Object/"USING AN OBJECT AS A HASH"" apply here, too. METHODS
See JE::Types for descriptions of most of the methods. Only what is specific to JE::Object::Array is explained here. $a = JE::Object::Array->new($global_obj, @elements) $a = JE::Object::Array->new($global_obj, $length) $a = JE::Object::Array->new($global_obj, @elements) This creates a new Array object. If the second argument is an unblessed array ref, the elements of that array become the elements of the new array object. If there are two arguments and the second is a JE::Number, a new array is created with that number as the length. Otherwise, all arguments starting from the second one become elements of the new array object. $a->value This returns a reference to an array. This is a copy of the Array object's internal array. If you want an array through which you can modify the object, use @$a. SEE ALSO
JE JE::Types JE::Object perl v5.14.2 2012-03-18 JE::Object::Array(3pm)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy