shell script similar to the command HEAD

hello
please if anyone can help me make a shell script similar to the command HEAD and TAIL
THANKS

Why, what's wrong with the programs found on every UNIX system? Or is this a class project? If so, please post again in the appropriate forum after you've read the special rules for homework.

you can refer these..

# print first 10 lines of file (emulates behavior of "head")
 awk 'NR < 11'

 # print first line of file (emulates "head -1")
 awk 'NR>1{exit};1'

  # print the last 2 lines of a file (emulates "tail -2")
 awk '{y=x "\n" $0; x=$0};END{print y}'

 # print the last line of a file (emulates "tail -1")
 awk 'END{print}'

i'm sorry for the derangement... this is a class project

---------- Post updated at 01:24 PM ---------- Previous update was at 01:18 PM ----------

Thank you for your help vidyadhar85