I have a text file that looks like this:
rno-miR-344-5p
miRPlus_11239/mmu-miR-383/rno-miR-383
hsa-miR-301a/mmu-miR-301a/rno-miR-301a
hsa-miR-199a-3p/hsa-miR-199b-3p/mmu-miR-199a-3p/mmu-miR-199b/rno-miR-199a-3p
Empty
Hy3
rno-miR-1
rno-miR-598-5p
spike_control_h
Empty
I would like to print every line. BUT for those lines that contain e.g. hsa-miR-301a/mmu-miR-301a/rno-miR-301a I would like to print only the rno-miR-etc part.
I've been trying to do this with awk but I out of my depth.