I am trying to add a column (with content "0") in the middle of an existing tab delimited text file. I suppose sed
or awk
will do what I want. I have seen various solutions on the Internet that do something like this, but they are not explained simply enough for me to change!
I currently have this content:
Affx-11749850 1 555296 CC
I need this content
Affx-11749850 1 0 555296 CC
Using the awk '{$3=0}1'
filename command ruined my formatting AND replaced column 3 with 0, instead of adding a third column with 0.
Any help (with an explanation!), So I can solve this problem and future similar problems, very valuable.
source share