Replacing missing value blank space with zero
You could do it like this with awk:
awk 'BEGIN { FS = OFS = "\t" } { for(i=1; i<=NF; i++) if($i ~ /^ *$/) $i = 0 }; 1' file
Explanation
Setting FS and OFS to tab ensures the output is correctly delimited. The for-loop looks at every field and sets it to zero if it is empty. The one at the end is a shorthand for { print $0 }
.
I'd prefer:
sed 's/<TAB> /<TAB>0/g' <input.txt >output.txt
Replace <TAB>
with the real TAB character (generally obtained by hitting Ctrl-V, then Tab)