With sed:
sed -e "/^.\./s/^/0/" file.txt The pattern /^.\./ looks for any character and a literal dot at the start of line ^, and if that matches, substitute that start of line with a zero, effectively adding the zero to the start.
The sed expressoin s/.\{0\}/0/ is somewhat odd, it matches zero or more copies of anything and replaces with a zero. The pattern will of course match in every position of the string, but since s/// only replaces the first match, it works as you intended. A quaint way to do it, though.
Or with awk, a similar regex would work to match the line, but we can use substr:
awk 'substr($0, 2, 1) == "." {$0 = "0" $0} 1' file.txt We first test if the second character is a dot, then add a zero to the front of the line if so. The final one invokes the default action of printing the line after any modifications.