Notes

Pipes |

Edit on GitHub


Commands

Pipe |

Pipes the output of one command as the input of another.

Let’s you put commands together

grep commands are very commonly used with piped input.

For example:

1ls /etc/ | grep cron

Screenshot - Pipe output

You can use multiple pipes

1ls /ect/ | grep cron | grep daily

Screenshot - Pipe multiple outputs

Another example is:

1curl -s http://link.com | bash

will pass in the output of the curl command as the input of the bash command, which basically means you can now run commands off of internet scripts/files.