linux - Display single row by specifying line number? -


i want display content of file. way wanted is, when specify line number, should show row. example content in file named "file" follows:

/home/john /home/mathew /home/alexander /home/testuser /home/hellouser 

i want display single row @ time giving line number, if specify 3, should show following row.

/home/alexander 

i know way possible head , tail using -n flag, display entire rows upto line number specify, follows.

head -n3 file /home/john /home/mathew /home/alexander 

i don't want that, want display "/home/alexander" when choose line number 3. how possible?

with head , tail can following:

head -3 file | tail -1 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -