Head (Unix) - Other

Other

Many early versions of Unix did not have this command, and so documentation and books had sed do this job:

sed 5q foo

This says to print every line (implicit), and quit after the fifth.

Read more about this topic:  Head (Unix)