unix command to read line from a file by passing line number

Viewed 72971

I am looking for a unix command to get a single line by passing line number to a big file (with around 5 million records). For example to get 10th line, I want to do something like

command file-name 10

Is there any such command available? We can do this by looping through each record but that will be time consuming process.

5 Answers
Related