1
I have a tab-separated file in Linux that looks like this
~$ head list.tab
"x"
"1" "FUHGF.jnf.m22-1"
"2" "HDFHFEY.gfs.d2-1"
"3" "KJFGJF.fr.md2-1"
"4" "SDFSDIB.gfd.rtl2-1"
"5" "FGJFGOB.hgd.k2-5"
"6" "HJLHEH.fc.po2-1"
"7" "GFHFGV.gfn.col2-1"
"8" "KLAA.ghn.xil2-3"
"9" "KJGGFG.hgr.col2-2"
I would like to keep the first part of the name of the second column only. I know I will have to use cut
and sed
, but I cannot think of the structure of the command. My desired output is
~$ head list.tab
"FUHGF"
"HDFHFEY
"KJFGJF"
"SDFSDIB"
"FGJFGOB"
"HJLHEH"
"GFHFGV"
"KLAA"
"KJGGFG"
I've been trying with awk
and gsub
but I haven't used Linux for quite some time, help would be appreciated.
Many thanks