insert a field into a tab delimited file

Hello,

Can someone help me to do this with awk or sed? I have a file with multiple lines, each line has many fields separated with a tab. I would like to add one more field holding 'na' in between the first and second fields.

old file looks like,

1, field1 field2 field3 ...
2, field1 field2 field3 field4 ...
.
.

output:
1, field1 na field2 field3 ...
2, field1 na field2 field3 field4 ...
.
.

Many thanks

nawk -F'\t' '{$2="na" OFS $2}1' OFS='\t' myFile

use this:-

awk -F"\t" '(NF!=0){ $2=$2"\t""na" }1 ' input.txt

BR

You guys are the best! Thank you so much.

1-st and 2-nd - not 2-nd and 3-rd

right, but deserve my many thanks too!

guys in the out below it is between 2nd and 3rd not 1st and 2nd

1, field1 field2 field3 ...
2, field1 field2 field3 field4 ...
.
.

output:
1, field1 na field2 field3 ...
2, field1 na field2 field3 field4 ...

so my code is true.
awk -F"\t" '(NF!=0){ $2=$2"\t""na" }1 ' OFS="\t" input.txt

I believe '1, field' is field 1 with the embedded space.
If the OP used the code tags when posting code/data samples, we could all be sure.
It's for the OP to shed a light on the issue.