Hands-on task
Count errors in a log
In /var/log/app/app.log there are lines with levels: the level is the first word of the line. Count the number of lines at level ERROR and write only the number into /root/error_count.txt. Careful: the word ERROR also appears in the message text of other levels.
- grep
- line counting
- logs
- redirection
- patterns