Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
convert column to associative array
Name: ragu Date: April 29, 2005 at 14:08:11 Pacific OS: solaris 8 CPU/Ram: intel
Comment:
hi Can any of the awk gurus around show me how to read 2 columns from a file and load them into an associative array. I have to do this from a ksh script. e.g if i have a file with 2 columns
Stock Price --------------------- IBM 21 INTEL 12
I should be able to get the price using a map(associative array)stock_price like: price = stock_price[IBM]
Summary: I am trying to create an associative array "table", where the key of an element consists of a line from the "usernames" file, and the value of all elements is 0. I am suppose to use this code snippet...
Summary: Hi: First, I'd like to know what unix shell you are using before I get too much into arrays. This little korn shell script reads and parses a file with only 2 columns per line: #!/bin/ksh while rea...