 ![[Header]](../XuShared2/Line3c.jpeg)
Return to Previous Page
More Info: Pipes
One of the coolest things about the Unix command line is how different commands can work together
using a process called "piping". The output from one command can be piped to
the input of another. The "|" (vertical bar) symbol is placed after the command which is
providing the output, and before the command which is accepting the input.
For example to make the output from a long directory command easier to read you could use
the more command. More stops after each page and waits for you to press space.
To pipe the directory from the ls command to the more command just use ls | more.
One subtlety about this (which other systems don't have) is that the data is streamed between
concurrent processes. In other words the second command processes output from the
first command as it appears, the first command is still running at the same time.
Of course, its possible to pipe between more than two programs. For example to list, sort,
then more your data use ls | sort -f | more. I used the f option for the sort
command so that upper and lower case was sorted together.
Insert query failed: INSERT INTO log VALUES (NULL,1,'2025-12-23','172511','Pipe.html','XuMacTerminal','216.73.216.208','Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@a','');.
|