awk output seperated by tab

I am just trying to output the below awk separated by tabs. Thank you :).

awk (added OFS as an attempt to itroduce tabs)

awk '{split($5,a,"-"); OFS='\t' print $1,$2,$3,a[1]}' file.bed > test.bed 

The awk runs and produces all the data in 1 field instead of 4 fields.

current output

chr1    955543    955763   AGRN is in one field as of now

desired output

field1   field2       field3      field4
chr1    955543    955763   AGRN
awk '{split($5,a,"-"); print $1,$2,$3,a[1]}' OFS='\t' file.bed > test.bed
1 Like

Thank you :).