cli.fail

Practice this fail.

Ten comes before two?

Linux · Restart as often as you like

Read the error, choose a command, and learn
why it works. Nothing runs on your machine.

Browse all practice ↗

Linux · Beginner

numbers.txt contains one decimal integer per line. Using GNU sort, sort by numeric value in ascending order.

Ten comes before two?

$ sort numbers.txt

1 10 2

How do you request numeric ordering?

3 attempts remaining

Read why this fix works

Ten comes before two?

sort -n numbers.txt

sort -n compares numeric values rather than their textual ordering. Plain lexical ordering places 10 before 2 because it compares characters.

Practice rounds do not affect the daily score or local streak. Try today’s challenge, or choose another scenario.

Copy your result