You can always add your new entry with a x. newentry syntax and renumber everything afterwards with something like:
awk -F . -v OFS=. '{if (NF) $1 = ++n; else n = 0; print}'
-F .: sets the field separator to.1-v OFS=.: same for the output field separator (-F .is short for-v FS=.).{...}: no condition so the code inside{...}is run for each lineif (NF), if the number of fields is greater than 0. WithFSbeing., that means if the current line contains at least one.. We could also make itif (length)to check for non-empty lines.$1 = ++n: set the first field to an incrementedn(initially 0, then 1, then 2...).else n = 0: else (when NF == 0) reset n to 0.print: print the (possibly modified) line.
1The syntax is -F <extended-regular-expression> but when <extended-regular-expression> is a single character, that is not taken as a regular expression (where . means any character) but as that character instead.