command1 | command2Arguments explained
- Options adjust output or behavior.
- Arguments name the files, services, hosts, or values the command should work with.
Common examples
journalctl -u nginx | grep -i error | lessPasses service logs through grep and then into a pager.
grep -i error app.log | wc -lCounts matching lines.
| Field | Details |
|---|---|
| Command | pipe |
| Category | Shell and Environment |
| Primary use | Sends output from one command into another. |
| Syntax | command1 | command2 |