I have a file that looks like that:
chr1 3143567 3143568 .3-2704 1.000000|ENSMUSG00000102693.2
chr1 3143599 3143600 .3-2705 1.000000|ENSMUSG00000102693.2
chr1 3143631 3143632 .3-2706 1.000000|ENSMUSG00000102693.2
chr1 3143663 3143664 .3-2707 1.000000|ENSMUSG00000102693.2
chr1 3143695 3143696 .3-2708 1.000000|ENSMUSG00000102693.2
chr1 3143727 3143728 .3-2709 1.000000|ENSMUSG00000102693.2
I'm writing 2 sed expressions to filter everything before the |
first and with result file I discard everything after the .
like so:
sed -n -e 's/^.*|//p' original_file.txt > first_result.txt
sed -n -e 's/\..*//p' first_result.txt > final_result.txt
How can I write all of that in one line ?
The end goal is to capture ENSMUSG00000102693