Closed

Linux sort correctly

This project received 27 bids from talented freelancers with an average bid price of $19 USD / hour.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
$15 - $25 USD / hour
Total Bids
27
Project Description

Hi,

I have 2 test files that I need to sort with the same command.

File 1: [url removed, login to view]

The command I'm using is:
cat [url removed, login to view] | awk '{print $2}' | cut -d '/' -f 3 | cut -d '^' -f 1 | sort -b -t . -k 1,1nr -k 2,2nr -k 3,3r -k 4,4r -k 5,5r | uniq > [url removed, login to view]
cat [url removed, login to view] | awk '{print $2}' | cut -d '/' -f 3 | cut -d '^' -f 1 | sort -b -t . -k 1,1nr -k 2,2nr -k 3,3r -k 4,4r -k 5,5r | uniq > [url removed, login to view]


ISSUE:
I need to sort CORRECTLY in descending order, because right now, only file 2 is sorting correctly, but file 1 is not sorting correctly.

I need that both files should sort correctly, in descending order.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online