🐧 Linux / Shell Scripting
Beginner
What is the pipe (|) operator in Linux?
Answer
The pipe operator | connects the standard output (stdout) of one command to the standard input (stdin) of the next, creating a processing pipeline. This is the Unix philosophy of composing small, single-purpose tools. Examples: ps aux | grep nginx (filter process list), cat access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -10 (find the top 10 IP addresses in a web log). Pipes are buffered and run concurrently — the left command produces output as the right command consumes it, making pipelines efficient even on large data streams without loading everything into memory.
Previous
How does SSH work and what are its basic usage patterns?
Next
What is the difference between > and >> for output redirection?