How to manipulate and extract certain data from a table?

Viewed 43

I am quite new to Linux. I have data like the following but I have thousands of Features.

>Feature gnl|XXX|IFEJKLFI_1
            locus_tag   IFEJKLFI_00001
            locus_tag   IFEJKLFI_00002



>Feature gnl|XXX|IFEJKLFI_88
            locus_tag   IFEJKLFI_00023
            locus_tag   IFEJKLFI_00033

Let's say I am only interested in (IFEJKLFI_00002) and (IFEJKLFI_00023), and I need to know which Feature they belong to.

So, I need the result to be

>Feature gnl|XXX|IFEJKLFI_1      IFEJKLFI_00002

>Feature gnl|XXX|IFEJKLFI_88     IFEJKLFI_00023

Can I do that?? Thanks!!!!

0 Answers
Related