What you will build
Step 1: Rank the top clients
access.log is a common-format web log with a time zone in the timestamp, so the client address is field 1, the status is field 9, and the path is field 7. Save the top clients with their counts, skipping short or blank lines:
awk 'NF >= 9 { print $1 }' access.log | sort | uniq -c | sort -rn | head -5 > clients.txtStep 2: Count status codes in numeric order
Count each status code, and sort the result by the code itself, not by the count:
awk 'NF >= 9 { print $9 }' access.log | sort | uniq -c | sort -k2,2n > status.txtStep 3: Write report.sh with usage checks
Write report.sh in /workspace. It takes one log path, prints the headings Top clients, Status codes, and Top paths with their tables, and exits with status 2 when the argument is missing or unreadable. Use the pipelines from the previous steps as the core of each section. Run it on access.log to test it:
bash report.sh access.logFiles
walkthrough.sh: every step of the reference solution, in order.
How it is checked
Each step in the guided lab has a check script that runs on the lab machine after you finish. It passes only when the files and output it expects are there, so the lab cannot be completed by reading alone.