Write a command to print the line number before each line?

awk ‘{print NR, $0}’ filename

Category: UNIX Interview Questions.