BEGIN {i=1}
{ printf("%s %s\n", i, $0)
i = i + 1

I needed to add line numbers to a text file from cmd.exe on a Windows XP box. I happened to have Gnu Awk (for Windows) installed. Yeah, there are other ways to accomplish the task but this worked fine for me at the time.