I have file1:
"$lvl=57"
"$lvl=20"
"$lvl=48"
"$lvl=17"
"$lvl=58"
File2 I want:
"$lvl=17"
"$lvl=20"
"$lvl=48"
"$lvl=57"
"$lvl=58"
Basically numerically sort of file1.
sort
I have file1:
"$lvl=57"
"$lvl=20"
"$lvl=48"
"$lvl=17"
"$lvl=58"
File2 I want:
"$lvl=17"
"$lvl=20"
"$lvl=48"
"$lvl=57"
"$lvl=58"
Basically numerically sort of file1.
Best Answer
I like -V --version-sort: it behaves very well for many situations mixing strings and numbers
I use this option very often...
In the some direction,
ls -v
for version-sortls
.