Sort Command #1, is a HackerRank problem from Text Processing subdomain. In this post we will see how we can solve this challenge in Sh

Problem Description

In this challenge, we practice using the sort command to sort input in text or TSV formats. Given a text file, order the lines in lexicographical order.

Input Format

A text file.

Output Format

Output the text file with the lines reordered in lexicographical order.

Sample Input

Dr. Rajendra Pra ....

You can find the full details of the problem Sort Command #1 at HackerRank

Solution: Please check the snippet for the solution.

This solution originally posted at: Github by @srgnk