Display a particular line from a file

Hi,

What is the command i can use iof i want to display a particular line from a file, i have the line number with me.

head -n filename | tail -1
n = linenumber

sed -n "${line_number}p"  $filename

Hi Friends,

Thank you so much, now i have 2 options to achieve the functionality.

Hi Klashxx,

The command is serving the purpose but can you please let me know the meaning of the options supplied :

sed -n "linenumber p" filename

i know p option is to print ... but how does -n work.

This is only for my knowledge.

Thanks again !

The -n flag suppress automatic output of input lines.

Cheers.