Back to Blog
Arnošt Havelka

Premium: Bash Log Hunt

Hunt deployment failures fast with grep pipelines, counts, and saved incident notes.

Start Interactive Lesson
Premium: Bash Log Hunt

When incidents hit, speed matters. This drill teaches a repeatable grep workflow for mixed-case errors.

Pipeline Pattern

Try the command

Which command stores the fail count?

Build the command
cat deploy.log | grep -i 'fail' | wc -l > fail-count.txt
grep -iMatch fail/FAIL/Fail in one pass.
wc -lCount matching lines.
>Save count to a report file.
Terminal
C:\Users\User>cat deploy.log | grep -i 'fail' | wc -l > fail-count.txt

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:


Knowledge Check

1 / 2

Why use grep -i during incident triage?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Premium: Bash Incident Drill

Run a safe release triage workflow: stage, extract errors, and verify impact volume.