İptal Edildi

Linux sort correctly

Hi,

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

File 1: [login to view URL]

The command I'm using is:

cat [login to view URL] | 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 > [login to view URL]

cat [login to view URL] | 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 > [login to view URL]

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.

Beceriler: Linux, Kabuk Betiği

Daha fazlasını gör: 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

İşveren Hakkında:
( 162 değerlendirme ) Brooklyn, United States

Proje NO: #5267644

Bu iş için 23 freelancer ortalamada $18/saat teklif veriyor

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 Daha Fazla

$30 USD / saat tutarından itibaren
(854 Değerlendirme)
8.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 / saat tutarından itibaren
(327 Değerlendirme)
7.4
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 / saat tutarından itibaren
(332 Değerlendirme)
7.0
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 [login to view URL] PROFILE : Am a Redhat certified Engineer ( Cert Daha Fazla

$15 USD / saat tutarından itibaren
(279 Değerlendirme)
6.8
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 / saat tutarından itibaren
(39 Değerlendirme)
5.6
brylu

Hello, How are those files different? .

$25 USD / saat tutarından itibaren
(50 Değerlendirme)
5.3
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 / saat tutarından itibaren
(36 Değerlendirme)
4.6
Archik

Hi, I modified your commands, removed one 'cut' and changed 'sort'. The result is [login to view URL] By the way, your 2nd command doesn't work well. On my system it remains dupl Daha Fazla

$15 USD / saat tutarından itibaren
(15 Değerlendirme)
4.8
balamuralip

I think this is the output you are expecting right? [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] 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. Daha Fazla

$15 USD / saat tutarından itibaren
(11 Değerlendirme)
3.8
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, Daha Fazla

$15 USD / saat tutarından itibaren
(2 Değerlendirme)
2.7
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 - [login to view URL]

$15 USD / saat tutarından itibaren
(1 Yorum)
1.4
gacanepa

Hi! I would love to help you with this project. Feel free to look me up on LinkedIn: linkedin[dot]com[slash]pub[slash]gabriel-cánepa[slash]41[slash]bb1[slash]491. I look forward to hearing from you. Best regards.

$15 USD / saat tutarından itibaren
(2 Değerlendirme)
1.6
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 / saat tutarından itibaren
(1 Yorum)
1.0
Tigurius

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

$22 USD / saat tutarından itibaren
(1 Yorum)
0.7
njkalra

Headed several automation projects involving the use of shell scripting. Got several appreciation from clients and vendors.

$21 USD / saat tutarından itibaren
(0 Değerlendirme)
0.0
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 [login to view URL]~011f50 Daha Fazla

$15 USD / saat tutarından itibaren
(1 Yorum)
0.0
crazyJin

Take a look at the last 4 lines of [login to view URL]: v.1.5.7 0.1 alpha-1 new It's not in descending order!! Maybe the folowing output is what you want. Or the lines beginning with the letter come in the final. I Daha Fazla

$16 USD / saat tutarından itibaren
(0 Değerlendirme)
0.0
nope0000

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

$15 USD / saat tutarından itibaren
(0 Değerlendirme)
0.6
bearrailgun

Hi. I would like to help you with that. Like bash scripts with awk usage. It looks like something wrong with sort usage. I don't think it will take much time. Regards.

$15 USD / saat tutarından itibaren
(0 Değerlendirme)
0.0
linuxsysconfig

Hi, Your 2 sample files have different formats for the 3rd sorting field (which is either numeric or string) so you have to run the sort command several times. Here is what I came up with: cat [login to view URL] | awk ' Daha Fazla

$22 USD / saat tutarından itibaren
(0 Değerlendirme)
0.0