Hi all,
I have been struggling with this all day, and it is key to a conversion database I have to write.
The data converts the information out of an array using AWK, and basically all I have to do is figure out how to get the value of a variable inside a variable.
Right now at its simplest level, I have:
mpgw=13
CATEGORY=mpgw
I need to get the value 13 out of CATEGORY.
I have seen documentation that says you can do (within AWK):
findCATEGORY=eval echo CATEGORY
but this is just the same as:
findCATEGORY=CATEGORY
it is always mpgw, never 13. Does this make sense?
Perhaps it can be done within a function.
I would like to stay with AWK, or I have to start this conversion program completely over from scratch, and I've been working on it for days.
Thanks for any advice,
jeffpas
PS Perhaps a system call, writing and reading to an outside file, using a printf statement.............these are all things I'm investigating. But it has to be within the data stream (awk) so that it does it to every line being converted. No luck........