Change of file name
1
0
Entering edit mode
6.1 years ago
ahmedferoz20 ▴ 10

I have a blast output named as

NP_001034280.2  XP_018570607.1.

However, i want to convert this as

TC_001034280.2    AGLA_018570607.1.

How i could do this?

I was trying this one

awk 'NR==1 {gsub("\\NP", "TC", $0); quit};1' file.txt

However, i it did not work.

sequence gene • 572 views
ADD COMMENT
0
Entering edit mode
6.1 years ago
Ram 44k
awk 'NR==1 { gsub(/NP/, "TC"); }' file.txt
ADD COMMENT

Login before adding your answer.

Traffic: 1780 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6