You want to delete from the
:, and then as many characters that are digits or dots as possible directly after that:
$ sed 's/:[0-9.]*//g' file.vcf
0|0 0|1 0|0 0|0
0|1 0|0 0|0 0|0
You also need that
g at the end to repeat the substitution for all matching substrings on each line.
sed 's/[:].*$//' file.vcf
would match the first
: character, and then any number of characters to the end of the line. This is why you end up with
as the output.
The difference between this and my suggested expression is the
. (which matches any single character), which I changed to
[0-9.] to restrict the set of characters that we actually want to delete. We also can't anchor the pattern to the end of the line with
$ since we need to delete things in the middle of the line as well. And the
g at the end, but I already mentioned that.