Hands-on task
How many errors?
Your boss asks: how many errors were there in the log /root/logs/app.log? It has three hundred lines, and counting by eye would take ages.
Count the lines that contain ERROR and write a single number to /root/count.txt. Try to do it in one line: find the lines and count them right away by joining two commands with the | sign.
- wc -l
- pipe |
- grep
- pipelines