•Arnošt Havelka
Premium: Bash Log Hunt
Hunt deployment failures fast with grep pipelines, counts, and saved incident notes.
Start Interactive LessonPremium: Bash Log Hunt
When incidents hit, speed matters. This drill teaches a repeatable grep workflow for mixed-case errors.
Pipeline Pattern
Usage:cat deploy.log | grep -i 'fail' | wc -l > fail-count.txt
grep -i
Match fail/FAIL/Fail in one pass.
wc -l
Count matching lines.
>
Save count to a report file.
Step 1: Confirm Error Signal
Command Prompt
INFO deploy started
WARN retrying worker
FAIL api timeout
info finished stage
fail db reconnect
C:\Users\User>cat deploy.log
Step 2: Save Count for the Timeline
Command Prompt
C:\Users\User>cat fail-count.txt
Step 3: Slice by Incident Theme
Use extra filters to split failures by symptom:
grep -i 'timeout' deploy.log > timeout-errors.loggrep -i 'db' deploy.log > db-errors.log
Knowledge Check
1 / 2Why use grep -i during incident triage?
References
These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.