i have a file with library-ID-count as follows: `*
Searching cagcaccaccaagauucacau*
CC2_B ta_iwgsc_7bs_v1_3148968_39029 33
CC2_B ta_iwgsc_7bs_v1_3150171_39041 38
CC2_D ta_iwgsc_7ds_v1_3966917_41463 156
CC3_B ta_iwgsc_7bs_v1_3148968_41273 56
CC2_A ta_iwgsc_6al_v1_5830987_31258 18
CC2_B ta_iwgsc_6bl_v1_4279451_30909 18
CC2_D ta_iwgsc_6dl_v1_3311975_32342 18
CI2_A ta_iwgsc_6al_v1_5830987_27002 30
CI2_B ta_iwgsc_6bl_v1_4279451_26849 30
CI2_D ta_iwgsc_6dl_v1_3311975_28474 30
*Found(s) in 6 file(s)*
*Searching ugccuggcucccugaaugcca*
CC2_B ta_iwgsc_6bs_v1_1636307_32644 3275
CC2_B ta_iwgsc_6bs_v1_1636307_32645 3575
CC3_B ta_iwgsc_6bs_v1_1636307_34610 3449
CI1_B ta_iwgsc_6bs_v1_1636307_28706 3509
CC2_A ta_iwgsc_7as_v1_4255214_39664 1809
CC2_B ta_iwgsc_7bs_v1_3149865_39035 1809
CC2_D ta_iwgsc_7ds_v1_3850348_38998 1809
*Found(s) in 3 file(s)*
` i want each library(CC1_A,CC2_B ETC) to have its highest count,as you can see the counts differ for same library. and print each library with following format for each seperate block(paragraph) :
'Searching cagcaccaccaagauucacau:
CC2_B 38
CC2_D 156
CC3_B 56
CC2_A 18
CI1_A 30
CI1_B 30
CI1_D 30
Searching ugccuggcucccugaaugcca:
CC2_B 3575
CC3_B 3449
CI1_B 3509
CC2_A 1809
CC2_B 1809
CC2_D 1809 '
please click button
101010
to format code or file content!similar post: how to remove rows based on certain characters