My file looks like this :
1-0039.1 EMBL transcript 1 1524 . + . transcript_id "1-0039.1.2"; gene_id "1-0039.1.2"; gene_name "dnaA"
1-0039.1 EMBL CDS 1 1524 . + 0 transcript_id "1-0039.1.2"; gene_name "dnaA";
1-0039.1 EMBL transcript 1646 1972 . + . transcript_id "1-0039.1.5"; gene_id "1-0039.1.5"; gene_name "ORF0009"
I want to change all "1-0039.1" values in the first column to 1
so I have tried:
awk -vOFS='\t' '{$1="1"; print}' 1-0039.gtf > 1-0039_modified.gtf
And the output looks like this:
1 EMBL transcript 1 1524 . + . transcript_id "1-0039.1.2"; gene_id "1-0039.1.2"; gene_name "dnaA"
1 EMBL CDS 1 1524 . + 0 transcript_id "1-0039.1.2"; gene_name "dnaA";
1 EMBL transcript 1646 1972 . + . transcript_id "1-0039.1.5"; gene_id "1-0039.1.5"; gene_name "ORF0009"
1 EMBL CDS 1646 1972 . + 0 transcript_id "1-0039.1.5"; gene_name "ORF0009";
1 EMBL transcript 2023 2940 . + . transcript_id "1-0039.1.7"; gene_id "1-0039.1.7"; gene_name "ORF0586"
1 EMBL CDS 2023 2940 . + 0 transcript_id "1-0039.1.7"; gene_name "ORF0586";
1 EMBL transcript 2897 3223 . + . transcript_id "1-0039.1.9"; gene_id "1-0039.1.9"; gene_name "ORF0009"
As you can see values in the last column were space-separated but now they are tab separated. My question is how do I change the first column only without messing up other columns?