# Lines matching either of two patterns
grep -E "(ERROR|FATAL)" /var/log/app.log
# Inverse: lines NOT matching
grep -v "DEBUG" /var/log/app.log
# Case-insensitive search with line numbers and 2 lines of context
grep -inB2 -A2 "stripe" /var/log/app.log
# Match a regex with groups (use -o to print only the match)
grep -oE 'user_id=[0-9]+' /var/log/app.log | sort -u
# Use ripgrep (rg) — faster and respects .gitignore by default
rg "ERROR" --type=log -C 2
Create a free account and build your private vault. Share publicly whenever you want.