bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delete elements from an array...


From: OnTheEdge
Subject: delete elements from an array...
Date: Tue, 10 Mar 2009 11:46:31 -0700 (PDT)

I'm having a problem getting this to work. I'm currently doing this using a
file instead of an array, but it is too slow. Here's what I'm trying to do:

For each record in my main array (array1), I want to get a match out of
array2 and append it to the array1 record. After I get the match, I want to
delete that record from array2.

For example, array2 looks something like this:
Ohio Columbus
Ohio Cleveland
Texas Dallas
Texas Austin

I want to find the first occurrence of 'Ohio' and append Ohio and Columbus
to the array1 record. Then I want to remove the 'Ohio Columbus' record from
the array so I don't pick it up the next time I search on Ohio.

Any help would be greatly appreciated...
Duane

-- 
View this message in context: 
http://www.nabble.com/delete-elements-from-an-array...-tp22440833p22440833.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]