Awk delimiters

Hi,
I have a file which looks like this:


I want an output like this:

I wrote :

awk 'BEGIN { OFS=FS="\t" } { sub("\\..*", "", $1); print }'

so it produces columns with ENST names, I want it to produce names in the 5th column:

awk 'BEGIN { OFS=FS="\t" } { sub("\\..*", "", $5); print }'

But it is not working. What wrong am I doing here. KIndly help.

Well, firstly don't provide input/output as images - it makes it impossible to anybody to help. Please provide input/output as properly formatted ASCII text using markdown code tags.
Secondly, format your code attempts with proper markdown tags - see reference above.
Thirdly, what're the columns with ENST names?

Make modifications given the points above and maybe someone will help.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.