Tail is done with different arguments.
Head tool is done with multiple arguments.
Simple Uniq tool is done.
Simple sort without any option is done.
Reducing spaces is done without writing it into file.