← All hands-on practice
Python · 15 min
Write the script
accepted.py is empty. Nothing is filled in for you. The log is /var/log/auth.log. Write a script that prints how many lines contain Accepted, save it, then run it.
Start it: free, in your browser, no account
What you will do
- Write accepted.py so it prints how many log lines contain Accepted, then run it.
Exam objectives it practises
- CompTIA A+ Core 2 4.8 Scripting basics
The box writes one file on this simulated machine. It is not nano, and it is not your computer. Python still only runs the lines named above the box.