I am having a file input.txt which include ~50,000 rows and ~100 column. I want to split is according to matching entry followed by the matching patter. File separator are both space and tab.
input.txt
#information
#dateofcreation
#file type
AA BB CC DD EE FF GG HH II
AA bb ac aD FF GG hg ad
DA ga Dt pp Ee FF gg pm TT
DA bR AT GT Gg FF GG Hb Yh
NM gt Jh GT FF hb TH KM MM
In the input file there a matching field FF in all the lines followed by the entry matches in some lines. I want to have three output file from this input file
GG.txt
AA BB CC DD EE FF GG HH II
AA bb ac aD FF GG hg ad
DA bR AT GT Gg FF GG Hb Yh
gg.txt
DA ga Dt pp Ee FF gg pm TT
hb.txt
NM gt Jh GT FF hb TH KM MM
Thanks.
Asked by user3377241
(103 rep)
Oct 18, 2018, 08:42 PM
Last activity: Oct 18, 2018, 09:38 PM
Last activity: Oct 18, 2018, 09:38 PM