-2

list.txt:

af3400

af3500

cdf666

bgh400

bgfn44

123456

788000

567890

output.txt:

af3400

af3500

bgfn44

bgh400

cdf666

123456

567890

788000  

please help

4
  • You are looking for the "sort" command Commented May 25, 2015 at 3:40
  • possible duplicate of How can I sort alphanumeric strings in Unix? Commented May 25, 2015 at 3:42
  • i try this comand but only order in numerical form Commented May 25, 2015 at 3:42
  • in this post How can I sort alphanumeric strings in Unix? the command uses the phrase "tab" for order in numeric form Commented May 25, 2015 at 3:44

1 Answer 1

0

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.