Hi,
I have a table like this;
6 6:29002062:rs7755402 0 29002062 G A
6 6:29004091:rs9468471 0 29004091 A G
6 6:29006250:rs9468473 0 29006250 A G
6 6:29006493:rs9461499 0 29006493 C A
6 6:29006844:rs7743837 0 29006844 G A
I want to remove everything before "rs" in the second column. I know I can use egrep,
egrep -o "(rs\S+)" file | cut -d " " -f 2 > newfile
However, then I`m left with only the rs string;
rs7755402
rs9468471
rs9468473
rs9461499
rs7743837
rs6919044
rs41424052
rs6924824
rs6456886
rs6456887
But I actually want the other columns too. Any help is greatly appreciated!
Awesome! Thank you very much! This was exactly what I needed
pleased to hear you like it, you can visit the site and explore the rich functions it provides.