I have a file that looks like this:
xxxxxxx-000-387-159 < 50 null null_27 KCNQ1 1 1.430 0.773 0.656 1.724
xxxxxxx-000-375-285 < 50 < 50 100 - 500_0 KCNQ1 2 1.409 0.786 0.623 1.801
xxxxxxx-000-523-531 50 - 100 50 - 100 100 - 500_31 KCNQ1 3 1.326 0.848 0.479 1.557
I need to remove anything (spaces and character) after the first 19th characters and before letter K in KCNQ1. The expected output would be:
xxxxxxx-000-387-159 KCNQ1 1 1.430 0.773 0.656 1.724
xxxxxxx-000-375-285 KCNQ1 2 1.409 0.786 0.623 1.801
xxxxxxx-000-523-531 KCNQ1 3 1.326 0.848 0.479 1.557
I tried with sed:
sed -e 's/...................KCNQ/ KCNQ/g' file.rpt > file_new.rpt
However, it only changes the first line.
What am I doing wrong?