Linux
grep / sed / awk Helper
Build reliable grep, sed, awk and cut commands: shell-escaped pattern, useful options and common variants.
How it works
grep searches, sed transforms, awk analyses columns: the basic trio of text processing on Linux, essential for exploring logs.
The tool escapes the pattern for a POSIX shell and recalls the useful options: -n (line numbers), -i (case-insensitive), -r (recursive), -E (extended regex), -- to protect a pattern starting with a dash.
Examples
Frequently asked questions
Why use -- after grep?
So that the pattern is not interpreted as an option, for example with a pattern starting with a dash.
grep or ripgrep?
grep is universal; ripgrep (rg) is much faster on large repositories and ignores .gitignore automatically.