Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
andrewflnr
· 9y ago · 0 comments
My only real concern is with left-padding numbers with 0s when you don't know in advance how big the numbers are going to get. Do you pad to 2 or 3 digits or...
Comments
[–]
gdickie
9y ago
When you have a long list of numbered filenames with no padding, pipe the list through "sort -V" for "version number" ordering.
Edit: Glitchmr has a better solution below, "ls -v".
[–]
stouset
9y ago
Another annoyance is sorting hostnames, which reasonable sort right-to-left with period-delineated fields.