Description:
Your list is sorted wrong and nothing told you.
`sort` compares text, not numbers, so 100 comes before 9 and 2 comes last. The order looks deliberate. It is alphabetical.
Commands in this video, with the output they really produced:
printf '10\n9\n100\n2\n' → n.txt
sort n.txt
sort -n n.txt
Commands run live in a sandbox; nothing on screen is typed by hand.
#bash #linux #sort #shell #linuxforbeginners #shorts
Share this link via
Or copy link























