list.txt:
af3400
af3500
cdf666
bgh400
bgfn44
123456
788000
567890
output.txt:
af3400
af3500
bgfn44
bgh400
cdf666
123456
567890
788000
please help
list.txt:
af3400
af3500
cdf666
bgh400
bgfn44
123456
788000
567890
output.txt:
af3400
af3500
bgfn44
bgh400
cdf666
123456
567890
788000
please help
sort
with -g
option:
sort -g list.txt
-g
to put letters (a-z) before numbers (0-9)
To get output in a file:
sort -g list.txt -o output.txt
Or
sort -g list.txt > output.txt