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

Problem Description

You are given a file of text, where each line contains a number (which may be either an integer or have decimal places). There will be no extra characters other than the number or the newline at the end of each line. Sort the lines in descending order - - such that the first line holds the (numerica ....

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

Solution: Please check the sort-4.sh snippet for the solution.

This solution originally posted at: Github by @srgnk