Hi my input file looks as below
Y adghfdhfe 56 shdghjhfhjs
C dhchhhhht d7 dgghjhfhhf
Y ghfhhvvhb f2 cvbbbbnjhg
C dvvbhhfffd 5n fghhjjjjjjhf
Y fdjfufftghrg 56 ghgffgghhf
C fhgvfhhcdff D7 ghcghhjjj
Y cvvccvvvvv 45 chcxghggh
C gggcvvvvhb. Fg ghhjjjhhjjg
I want to group record with Y & C and my key is the combination of two character in middle from both Y & C. My output should give only the unique combination of the keys along with the record.
It should look like
Y adghfdhfe 56 shdghjhfhjs
C dhchhhhht d7 dgghjhfhhf
Y ghfhhvvhb f2 cvbbbbnjhg
C dvvbhhfffd 5n fghhjjjjjjhf
Y cvvccvvvvv 45 chcxghggh
C gggcvvvvhb. Fg ghhjjjhhjjg
It's like unique key combination of all the records.the vale in first character is constant and the position of key is same in both Y and C
Can we do this in sync sort
Regards,
Erick