All the commands we have looked at have printed their information to the screen, but this is often flexible.
A pipe is a connector between one command’s output and another’s input. Instead of sending its output to your terminal, using a pipe sends that output directly to another command as input.
Two of the commands we have looked at so far are
grep: the process lister and the string matcher. We can combine the two to find out which users are playing Nethack right now:
matthew@seymour:~$ ps aux | grep nethack
That creates a list of all the processes running right now and sends that list to the
grep command, which filters out all lines that do not contain the word
nethack. Ubuntu allows you to pipe as ...