Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-17-2007, 12:51 AM   #1
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
awk: associative array key names

Is there a way to get the keys of associative arrays in awk?
For eg: something like TCL's equivalent of [array names foo]?
Old 10-17-2007, 12:55 AM   #2
Senior Member
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
if i get you correctly

for (keys in array) print keys
or else, post a sample.
Old 10-17-2007, 12:58 AM   #3
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Original Poster
Rep: Reputation: 46
That's precisely what I'm looking for.
Cool, thanks.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Meta-key names in KDE Captain Tram Linux - Desktop 0 08-23-2006 01:43 PM
Perl: find array key by value bulliver Programming 2 04-06-2006 03:01 PM
exchange value and key per element in associative array rblampain Programming 3 04-02-2006 09:07 AM
using associative arrays corbis_demon Programming 0 01-25-2005 12:47 AM
How to return values into an array using awk Helene Programming 1 05-01-2004 10:05 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration