This article eseon, multiple sort criteria, I will explain how to sort. For example, the following input files (people.txt) Suppose: Rammus 420 255 50 335 Lucian 390 230 46 330 Kennen 403 200 47 335 Darius 426 200 50 340 Anivia 350 257 48 325 Ezreal 350 235 47 325 Aatrox funny gif 395 0 55 345 Graves 410 255 51 330 Draven 420 240 47 330 Now unpack the problem is: the value of the second field (420,390,403, ...) to sort and, if its value is equal to the value of the third field (255, 230, 200, ...) to sort. In this case, the command is: sort-k2, 2-k3, 3 people.txt is. The results are: Ezreal 350 235 47 325 Anivia 350 257 48 325 Lucian 390 230 46 330 Aatrox 395 0 55 345 Kennen funny gif 403 200 47 335 Graves 410 255 51 330 Draven 420 240 47 330 Rammus 420 255 50 335 Darius 426 200 50 340 Ezreal and Anivia look, the value of the second field (350, 350) are the same because the value of the third field (235,257) can be seen aligned. Draven and Rammus versa.
So, we introduced in the previous article "sort-k2, 3 people.txt funny gif What is the difference between?" The minutes will be. Pain in the long description because, simply wanna talk (but not an accurate description):-k2, 3 is as continuous fields to sort by. So, "the fourth field and the second field to sort" but not the same thing. I think she,-k2, 2-k4, 4 must be in.
2013 (27) 12 월 (20) 11 months (7) Microsoft Word - thesis writing gnuplot - Calculus Taylor (every chlorine) (Water), funny gif developed answers How to check C + + sort of Linux sort command (sort) - Advanced alignment Based on the Linux sort command (sort) - Sort by many Linux sort command (sort) - Sort by Linux sort command (sort)
No comments:
Post a Comment