Timeline for How would I sort a file numerically when some lines are single-digits and others are double-digits? [duplicate]
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 22, 2017 at 23:11 | comment | added | George Vasiliou | cut -c9-10 a.txt |sort -n | |
| Jan 22, 2017 at 14:11 | history | closed | Kusalananda♦ Satō Katsura Nidal Wildcard GAD3R | Duplicate of sorting filenames numerically when they have non-numeric prefix [duplicate] | |
| Jan 21, 2017 at 21:19 | comment | added | don_crissti | There are ways to do it, it all depends on your input. With this particular input sample sort -k1.9,1n should do (that is the sort starting position is the 9th char). If you can't use a starting position then isolating the column to be sorted is the way to go... | |
| Jan 21, 2017 at 20:42 | review | Close votes | |||
| Jan 22, 2017 at 14:11 | |||||
| Jan 21, 2017 at 20:42 | comment | added | Chindraba | One answer of that post uses the same option, but that question is more about renaming the files than actually sorting them. I think not duplicate. | |
| Jan 21, 2017 at 20:28 | answer | added | Chindraba | timeline score: 8 | |
| Jan 21, 2017 at 20:22 | review | First posts | |||
| Jan 21, 2017 at 21:29 | |||||
| Jan 21, 2017 at 20:22 | history | asked | sharp | CC BY-SA 3.0 |