Cancelled

Linux sort correctly

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.

Skills: Linux, Shell Script

See more: sort sort sort, sort sort, m linux, linux m, in linux shell script, uniq, awk, awk shell script, file sort, issue linux, awk command, linux test, shell sort, shell command, shell linux, sort file, shell script linux, linux shell, linux shell script, whitecollar18, linux order print, sort txt file linux, sort txt file, correctly, shell script sort

About the Employer:
( 94 reviews ) Brooklyn, United States

Project ID: #5267644

25 freelancers are bidding on average $18/hour for this job

linuxfreak1985

Hi there, I have over 7 years experience working on HTML, Wordpress, Magento, Database administration, OpenCart, Website Design, Logo / Banner Design Joomla, CSS and Linux Administration. I have read the project descri More

$30 USD / hour
(244 Reviews)
7.3
FandaR

Hello, I have over 9 years experience as an Linux admin and strong experience with bash scripting. I can modify the command to sort both files correctly. Please feel free to ask if you have any questions. Thank You

$21 USD / hour
(209 Reviews)
6.8
nqthai

Hi, I'm Thai Nguyen from Vietnam. Currently, i am working for one of the most biggest outsource software companies in Vietnam as Senior System Administrator. I have 6+ years experience on Linux System Administrator. S More

$25 USD / hour
(8 Reviews)
4.9
kaloyan13

Bash coder and shell guru. Did a small test with your commands and found the issue. Write me and we will discuss it.

$15 USD / hour
(34 Reviews)
4.6
brylu

Hello, How are those files different? .

$25 USD / hour
(21 Reviews)
4.5
sumitgarg44

I can help you to create a single sort command for both files. I will be required the files data to test and create my sort command.

$27 USD / hour
(18 Reviews)
4.1
MaRoQ

A proposal has not yet been provided

$22 USD / hour
(1 Review)
2.3
mikipeshevski

Hello, I work as a Linux/Unix system administrator for the past 10 years and have all the necessary skills and hands-on experience to complete the task. Hope to hear from you soon.

$22 USD / hour
(2 Reviews)
2.1
khushman

Extensive linux user. Will easily be able to solve your doubts. This shouldn't take more than an hour, though I've said two, just in case. Take me, and I'll do it!

$15 USD / hour
(1 Review)
1.0
mailsmaity

Ready to work on this.. will deliver project with in time. please assign to me. looking forward to work with you Discuss more on PM my skype id - mail.smaity

$15 USD / hour
(1 Review)
0.9
Tigurius

remove the sort on the first command or sort in reverse. This should work ...............................................

$22 USD / hour
(1 Review)
0.7
bindmission

Hello sir, I have an experience of 3 year in Linux filed.I will work for you You can see my other profiles too https://www.elance.com/s/edit/bindmission/ PROFILE : Am a Redhat certified Engineer ( Cert More

$15 USD / hour
(1 Review)
0.6
Archik

Hi, I modified your commands, removed one 'cut' and changed 'sort'. The result is https://www.dropbox.com/s/05h6qzzuj5rlvzl/1gr-out.txt By the way, your 2nd command doesn't work well. On my system it remains dupl More

$15 USD / hour
(1 Review)
0.4
whosham

Hello i have great experience in bash shell scripting i have made big projects in bash shell this is very simple project i can deliver it to you asap also check my odesk profile https://www.odesk.com/users/~011f50 More

$15 USD / hour
(1 Review)
0.0
Sithsu

I've already done this. I've downloaded the files and fixed the commands. My commands will fix couple of issues in sorting of file 2 as well. Can provide the fixes as soon as you award me the project. Took me one hour, More

$15 USD / hour
(0 Reviews)
0.0
balamuralip

I think this is the output you are expecting right? 5.0.rc1 5.0.rc2 5.0.rc3 5.0.rc4 5.0.rc5 4.2.20 4.2.19.15 4.2.19.14 4.2.19.13 4.2.19.12 4.2.19.11 4.2.19.10 4.2.19.9 4.2.19.8 4.2.19.7 4.2.19.6 4.2. More

$15 USD / hour
(0 Reviews)
0.0
OlegUkr

Hi whitecollar18, I'm newbie on this site, but I have a huge experience in required area and I need just a little help for start. -:) Thanks in advance, Oleg

$15 USD / hour
(0 Reviews)
0.0
atgoel

A proposal has not yet been provided

$16 USD / hour
(0 Reviews)
0.0
nope0000

Hi This works: cat 1gr-in.txt | awk '{print $2}' | cut -d '/' -f 3 | cut -d '^' -f 1 | sort -b -t . -nr | uniq > 1gr-out.txt Uniq isn't working, but that too doesn't work in the two commands you posted...

$15 USD / hour
(1 Review)
0.0
jbenoitJean

Try this : cat 1gr-in.txt | awk '{print $2}' | cut -d '/' -f 3 | cut -d '^' -f 1 | sort -b -t . -n -r -k 1,1 -k 2,2 -k 3,3 -k 4,4 -k 5,5 | uniq > 1gr-out.txt ; cat 2pc-in.txt | awk '{print $2}' | cut -d '/' -f 3 | More

$16 USD / hour
(0 Reviews)
0.0