Entering edit mode
2.6 years ago
강래
•
0
KX639503 EMBL biological_region 1636 4249 . - . ID=KX639503.14 featflags=type:tRNA gene=trnK-UUU
Hi
I want to design a shell script using awk or gsub.
How do I write a script to change biological_region in field 3 to utr when field 10 is a tRNA pattern?
I
awk '{if ($10 ~ /tRNA/) {gsub(/\biological_region/, "utr")} ' test1.txt
I entered it but it comes out as 0
If anyone knows, please advise.
Thanks in advance!
not sure what is going on here but as far as I remember GFF only has 9 fields (so there should not be any space/tab in that last field) ...
moreover the cmdline you post there can not work as it at least misses an
}