Lines Five to Seven
Print lines 5, 6 and 7 of book.txt, and no other line.
Example 1
book.txt
line 1 line 2 line 3 line 4 line 5 line 6 line 7 line 8 line 9 line 10
prints
line 5 line 6 line 7
Constraints
book.txthas 7 to 30 lines
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- One More LineEasy
- Sorted Into a FileEasy
- The Second ColumnEasy
- Three Largest NumbersEasy
- Without the HeaderEasy
- How Many FilesMedium
- If the File Is ThereMedium
- On One LineMedium