Here is the objective. To sort the input file, and make sure the data is in correct order.
Example
INPUT DATA:
AGABTI PAPER
ABABTI SUPPLY
ABABTI PAPER
AGABTI SUPPLY
AGABTI PAPERS
ABABTI SUPPLYS
ABABTI PAPERS
AGABTI SUPPLYS
I need to sort it by the first 2 letters in field one, then field 2,
so the output should look like this:
ABABTI PAPER
AGABTI PAPER
ABABTI PAPERS
AGABTI PAPERS
ABABTI SUPPLY
AGABTI SUPPLY
ABABTI SUPPLYS
AGABTI SUPPLYS
I don't have full code yet, but I ran a small code test to sort field 1(1:2) and field 2, I only get
ABABTI PAPER
ABABTI PAPERS
ABABTI SUPPLY
ABABTI SUPPLYS
AGABTI PAPER
AGABTI PAPERS
AGABTI SUPPLY
AGABTI SUPPLYS
Example
INPUT DATA:
AGABTI PAPER
ABABTI SUPPLY
ABABTI PAPER
AGABTI SUPPLY
AGABTI PAPERS
ABABTI SUPPLYS
ABABTI PAPERS
AGABTI SUPPLYS
I need to sort it by the first 2 letters in field one, then field 2,
so the output should look like this:
ABABTI PAPER
AGABTI PAPER
ABABTI PAPERS
AGABTI PAPERS
ABABTI SUPPLY
AGABTI SUPPLY
ABABTI SUPPLYS
AGABTI SUPPLYS
I don't have full code yet, but I ran a small code test to sort field 1(1:2) and field 2, I only get
ABABTI PAPER
ABABTI PAPERS
ABABTI SUPPLY
ABABTI SUPPLYS
AGABTI PAPER
AGABTI PAPERS
AGABTI SUPPLY
AGABTI SUPPLYS