I have a file whose fields are separated by '|' characters. I can't post it here due to confidentiality issues but each record looks something like this:
f1|f2|f3|f4|f4|f6|f7|C|f9|...
I need to examine each record and write the records to different files based on the value in field 8 ('C' in the example above). There are three possible values: C, O and E so there will be three files created each day when the script runs.
So far I've managed to extract the records of interest from the much larger master file and have them ready to break out into the three files ... but I'm stuck. Was thinking I could do it with awk but no combination I've tried is working.
Comments/thoughts/suggestions appreciated.
Thanks in advance.
Tom
"My mind is like a steel whatchamacallit ...
f1|f2|f3|f4|f4|f6|f7|C|f9|...
I need to examine each record and write the records to different files based on the value in field 8 ('C' in the example above). There are three possible values: C, O and E so there will be three files created each day when the script runs.
So far I've managed to extract the records of interest from the much larger master file and have them ready to break out into the three files ... but I'm stuck. Was thinking I could do it with awk but no combination I've tried is working.
Comments/thoughts/suggestions appreciated.
Thanks in advance.
Tom
"My mind is like a steel whatchamacallit ...