Skip to content
zero2vibecodelearn vibe coding

What cat … | grep does

Feed a file's contents into grep through a pipe.

catlog.txt|greperror
  • catcommand — print a file's contents
  • log.txtargument: a file, a folder, or text
  • |pipe: the previous command's output becomes the next one's input
  • grepcommand — find lines matching a pattern
  • errorargument: a file, a folder, or text

What it does when you run it

$ cat log.txt | grep error
error: disk full
error: retry

Run it yourself

The same files. Nothing here can break, and nothing leaves your browser.

Explain other commands

Written by Mikhail Kuzmitskii