Hello everyone,
Wish you A Happy and Prosperous New Year at the outset.
I am going to give the exact details of keys this time, alongside other information. Because last time due to my ignorance, many ended up loosing their precious time. Sorry again, for that.
I have 2 input files of different lengths.
In File 1(80 bytes), keys starts at position 13. Key length is total 5 bytes(marked in BOLD). Every alternate line is blank.
File1
======
./ add name=AB120
./ add name=BN132
./ add name=AA100
./ add name=AB125
./ add name=AB132
File2
======
In File 2(93 bytes), keys starts at 1st position of length 2 and at 24th position of 3 length. = Total 5 bytes.
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123
ZZ4364733476834734132liiiiiiiiiiiie8730dzz999-111111118dddd3222lolololo55555555554444422222110111111
BN166087892363362132suaemmm8730dis832-333930038dasd7232fasfasf777283232889288883998872222222
BN139687127127382132monieadic7330lis832-333998999hdka8323dasdas9999938828892858883993243535235
BN136687892363682132uytieeadci7330lis832-333998999hdka8323dasdas999993882889288588399324816247
BN188867127173682132kkekieadcc7330lis832-333998999hdka8323dasdas999993882889288583993215463464
BN111187892636844130iunssieadc7330lis832-333998999hdka8323dasdas9999938828892888853993247434737
AB111187893623682125ssaeimmm730dis832-333930038dasd7232fasfasf7772832328892888835998854737473
AB122287171273682125ssoniieadc7330lis832-333998999hdka8323dasdas999993882889288883959323737348
AA435731777711118100luimeiehe9993lid999-777777777deda3243dsdtats681331273999651121813842212222
AB107779236333682120suaemim8730dis832-333930038dasd7232fasfasf7772832328892588883995881089079
AB120333392333682120monieacc7330lis832-333998999hdka8323dasdas9999938828895288883993524899664
AB873562720991234120hunqgeey7333lis832-333333333hdka8323ttttats4444455555553333311111112434324
AB166087893633682132dasdjhas2222zis832-323123328fgkk4432ffdffff1298989232376764678466872443236
AB139687171273682132asjdashd7330lis832-333998999hdka8323dasdas9999938828892858886666664476587
AB136687923633682132uytieeadci7330lis832-66666234hdka8323dasdas9999938828892885883777744436436
AB188861271273682132kkekieacc7330lis832-3339982hdka8323dasdas999993ewe88288928858888835553456
AB166078923633682132suaemmm8730dis832-3339302121dasd7232fasfasf7772832328899999999995542342
AB139871271273682132monieadic7330lis832-3339984444hdka8323dasdas99999388255555555555555575675
AB136878923633682132uytieeadci7330lis832-333998111hdka8323dasdas999993882889444444444455487686
AB188671271273682132kkekieadcc7330lis832-33399222hdka8323dasdas999993882833333333333555543243
Write to output file only if key match, and in the order shown below.
Record from 1st file and all the key matched record from second file.
From 2nd file, output of around 61 bytes from bytes 23 to end is to be written.
Output File
===========
./ add name=AB120
120suaemim8730dis832-3222222222dasd7232fasfasf7772832328892588883995881
120monieacc7330lis832-333333333hdka8323dasdas9999938828895288883993524
120hunqgeey7333lis832-311111111hdka8323ttttats4444455555553333311111112
./ add name=BN132
132suaemmm8730dis832-333930038dasd7232fasfasf77728323288928888399887
132monieadic7330lis832-333998999hdka8323dasdas999993882889285888399324
132uytieeadci7330lis832-333998999hdka8323dasdas999993882889288588399324
132kkekieadcc7330lis832-333998999hdka8323dasdas99999388288928858399321
./ add name=AA100
100luimeiehe9993lid999-777777777deda3243dsdtats681331273999651121813842
./ add name=AB125
125ssaeimmm730dis832-5353136535dasd7232fasfasf777283232889288883599885
125ssoniieadc7330lis832-5315336337hdka8323dasdas999993882889288883959323
./ add name=AB132
132dasdjhas2222zis832-323123328fgkk4432ffdffff12989892323767646784668724
132asjdashd7330lis832-333998999hdka8323dasdas99999388288928588866666644
132uytieeadci7330lis832-66666234hdka8323dasdas9999938828892885883777744
132kkekieacc7330lis832-3339982hdka8323dasdas999993ewe882889288588888355
132suaemmm8730dis832-3339302121dasd7232fasfasf77728323288999999999955
132monieadic7330lis832-3339984444hdka8323dasdas999993882555555555555555
132uytieeadci7330lis832-333998111hdka8323dasdas9999938828894444444444555
132kkekieadcc7330lis832-33399222hdka8323dasdas9999938828333333333335555