I have one line files with 17 records separated by a semi-colon. I need to create a variable from each record, which I can do via a separate awk for each one, but I know there has to be a better way. Along with pulling out the variable, I need to convert some url coding like a + to a space, etc.
Now the last 6 records can have multiple entries for the single record and I need to name each one differently. For example, my 17th records is called PORT and it can have multple entries and I need a PORT1 PORT2 PORT3 and so on.
Here is a sample single line record:
100518-213;John+Smith;jsmith@gmail.com;
212-555-1212;js1234;OTHER;Universal+Exports;Normal;I+need+this+
request+completed+as+soon+as+possible+please.;Our+
department+needs+these+added+for+access+to+new+
servers;Please+update+our+group+when+completed.;
All 13-State 9-State;Add Add Delete;Router+Access Mail Other;
;10.1.1.1%2F24 192.168.1.1 10.2.1.1%2F22;23 25 80
how the multiple records (in the last 6 as you said) are recognized? separated by space always?
field 15 is null. is that a typo or fields can be null?
what is the final purpose to those variable? how do you going to use them?
perhaps your purpose can be solved in awk itself. (until it is really necessary to go back to the shell.)