Cmd Generator

grep

Search for patterns in files.

grep

Examples

# Search for a pattern
grep "error" server.log

# Case-insensitive recursive search
grep -ri "TODO" src/

# Count matches
grep -c "success" /var/log/app.log

# Invert match (show non-matching lines)
grep -v "#" config.conf

# Extended regex
grep -E "error|warning" log.txt

Sponsors