Three Largest Numbers
nums.txt has one whole number per line. Print the three largest, the largest first.
Example 1
nums.txt
9 120 7 45 10
prints
120 45 10
Constraints
- 3 to 20 numbers, none twice, from 1 to 500
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- Without the HeaderEasy
- How Many FilesMedium
- If the File Is ThereMedium
- On One LineMedium
- Orders Over a HundredMedium
- Pull Out the NumbersMedium
- Rename Them AllMedium
- SquaresMedium