23 / 55 · 19 Linux & Command Line · grep, curl, and jq← prev⊞ allnext →☰ Read as one page
3.8Hands-On Exercise
- Use
grepto find all ERROR lines in a log file, then count how many unique error messages there are - Use
curlto make a GET and POST request to a public API (e.g., https://jsonplaceholder.typicode.com) - Use
jqto extract and filter data from the API response - Combine all three: fetch a list of users with
curl, parse withjqto find admins, and pipe throughgrepto find a specific email domain - Time an API request with
curl -wand identify which phase (DNS, connect, TLS, first byte) is slowest - Write a one-liner that monitors an endpoint every 10 seconds and logs the status code and response time