How Many Errors
Print the number of lines in app.log that contain ERROR. A line with the word twice still counts once.
Example 1
app.log
INFO job 1 ERROR disk 3 ERROR after ERROR WARN mail 7
prints
2
Constraints
app.loghas up to 20 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
- Into a New FolderBeginner
- Last Two LinesBeginner
- Lines With ERRORBeginner
- One After the OtherBeginner
- Only the Text FilesBeginner
- Sort the NamesBeginner
- Colour to ColorEasy
- Each Line OnceEasy