The Longest Line
Print the longest line of lines.txt: the line with the most characters, spaces included.
Example 1
lines.txt
tea a long line of words milk and eggs
prints
a long line of words
Constraints
- 1 to 15 lines
- One line is longer than every other
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- The Most Common WordMedium
- Busiest VisitorsHard
- Lines of CodeHard
- Only in the FirstHard
- Share of ErrorsHard
- Shift Them UpHard
- Sort Into FoldersHard
- TODOs per FileHard