I've this plain text file that I need to be automatically examined and results written in another plain text file. Note that I'll use plain text and CSV interchangeably, since CSVs are plain text with common separator between data (commas, tabs, etc).
ABD-01A ABD-01B ABD-01C AL-25A AL-25B
Process one - recognize the first two sections of the data (
number) to repeat and count them in output CSV:
ABD-01,1 ABD-01,2 ABD-01,3 AL-25,1 AL-25,2
Process two - First part of the data gathered above has sort of a primary key assigned to them on a different file. I would like to get the primary keys mentioned in the newly generated files as well:
#primary key file 1,ABD-01 2,ABD-02 3,AL-02 20,AL-25 #newly generated file 1,ABD-01,1 1,ABD-01,2 1,ABD-01,3 20,AL-25,1 20,AL-25,2
So basically, what I'm asking her is if there's any software that can help me with this on either Windows or Linux-based operating systems. Bash can help me with simpler processing, but I don't think it can handle this much. Please advise.