I have two files, A.txt and B.txt:
A.txt (sep = \t) :
Well Sample Name Target Name Task Reporter
A1 B1000-1 MS2 UNKNOWN JUN
A1 B1000-1 Ngene UNKNOWN VIC
A1 B1000-1 ORF1ab UNKNOWN FAM
A1 B1000-1 Sgene UNKNOWN ABY
A2 B500-3 MS2 UNKNOWN JUN
A2 B500-3 Ngene UNKNOWN VIC
A2 B500-3 ORF1ab UNKNOWN FAM
and B.txt (sep = ;)
kit;;;;;;;
Software Version = cti;;;;;;;
Date And Time of Export = 06/02/20 14:14:11;;;;;;;
Experiment Name = taq;;;;;;;
Instrument Software Version = ;;;;;;;
Instrument Type = sds7500fast;;;;;;;
Instrument Serial Number = ;;;;;;;
Run Start Date = Tue Jun 02 12:00:40 CEST 2020;;;;;;;
Run End Date = Tue Jun 02 13:14:42 CEST 2020;;;;;;;
Run Operator = FE;;;;;;;
Batch Status = VALID;;;;;;;
;;;;;;;
Date And Time of Export;Batch ID;Sample Name;Well;Sample Type;Status;Interpretive;Action*;Cт
06/02/2020 14:14;020620 TAQPATH BIS;B50-1-KF;H2;Patient;VALID;SARS-CoV-2 Not Detected;REPORT;29.2525;Undetermined;16.0231;33.9412
And I want to get this in the output file, C.txt:
kit;;;;;;;
Software Version = cti;;;;;;;
Date And Time of Export = 06/02/20 14:14:11;;;;;;;
Experiment Name = taq;;;;;;;
Instrument Software Version = ;;;;;;;
Instrument Type = sds7500fast;;;;;;;
Instrument Serial Number = ;;;;;;;
Run Start Date = Tue Jun 02 12:00:40 CEST 2020;;;;;;;
Run End Date = Tue Jun 02 13:14:42 CEST 2020;;;;;;;
Run Operator = FE;;;;;;;
Batch Status = VALID;;;;;;;
;;;;;;;
Date And Time of Export;Batch ID;Sample Name;Well;Sample Type;Status;Interpretive;Action*;MS2;Ngene;ORF1ab;Sgene
06/02/2020 14:14;020620 TAQPATH BIS;B50-1-KF;H2;Patient;VALID;SARS-CoV-2 Not Detected;REPORT;29.2525;Undetermined;16.0231;33.9412
So I want to screen the lines that begin with A1 in A.txt and copy the 3rd fields of these lines as 9th field of line 13 of B.txt.
I've done some test with different FNR==NR but I have no conclusive result..
Thanks