I need to replace the pattern ### with the current line number.
###
I managed to Print in the next line with both AWK and SED.
sed -n \"/###/{
one-liner to modify the FILE in place, replacing LINE with the corresponding line number:
seq 1 `wc -l FILE | awk '{print $1}'` | xargs -IX sed -i 'X s/LINE/X/' FILE