$ ./guess_the_languageLinux CLI
Linux CLI · medium · #20

What does this print?

printf 'bob,30\nann,4\ncid,12\n' | sort -t, -k2 -n | head -1
  1. ann,4
  2. bob,30
  3. cid,12
  4. ann
-t, sets the separator, -k2 sorts on the second field, and -n compares it numerically, so 4 comes first.
Play Linux CLI ▸