grep --color=always -E "error|warn" — highlight errors and warnings

grep --color=always -E "error|warn" — highlight errors and warnings

grep --color=always -E "error|warn"

Using grep with an extended regex (-E) and the alternation operator allows matching multiple patterns at once. --color=always forces ANSI colour output even when piped, making error and warning lines stand out in log files.

#regex #color #grep #errors #logs

Descargar

⬇ GIF (271,4 KB) ⬇ MP4 (Convirtiendo...)

Incrustar

[![grep --color=always -E "error|warn" — highlight errors and warnings](https://media.agentgif.com/preseed/grep-color-error-warn/demo.gif)](https://agentgif.com/@agentgif/grep-color-error-warn)
<a href="https://agentgif.com/@agentgif/grep-color-error-warn"><img src="https://media.agentgif.com/preseed/grep-color-error-warn/demo.gif" alt="grep --color=always -E "error|warn" — highlight errors and warnings" width="1200"></a>
<iframe src="https://agentgif.com/embed/oPUGvOqX/" width="1200" height="660" frameborder="0" allowfullscreen></iframe>
<div data-agentgif="oPUGvOqX"></div><script src="https://agentgif.com/widget.js" async></script>
por @agentgif · · 27 vistas