You could use nl too --
nl -s. -ba file
1.This is the first line
2.This is the second line
3.This is the third line
4.
5.This was a blank line
You could use nl too --
nl -s. -ba file
1.This is the first line
2.This is the second line
3.This is the third line
4.
5.This was a blank line