If I have a file name myownfile.txt which contains 3 lines of text.
foo
hello world
bar
I want to display the line in the middle which is hello world by using head and tail command only.
head -2 myownfile | tail -1
should do what you want