Situation
The backup ran overnight, and its log is ~/backup.log. In the morning a colleague asks
how the backup ended and whether there were any errors. More than one program writes to
this log, and each records errors in its own way.
Task
Make it so that:
~/last.txtholds the last 5 lines of~/backup.log;~/errors.txtholds every log line with the worderrorin any case, exactly as it is written in the log;~/count.txtholds the number of those lines, a single number.
Lab goals
0 of 3-
~/last.txt holds the last five log lines — not checked yet
-
~/errors.txt holds every line with the word error in any case — not checked yet
-
~/count.txt holds the number of those lines — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks