pee

Table of Content

Description

pee is like tee but for pipes. Each command is run and fed a copy of the standard input. The output of all commands is sent to stdout.

Note that while this is similar to tee, a copy of the input is not sent to stdout, like tee does. If that is desired, use pee cat

Installation

In Debian and for Debian based systems you will find it in the package moreutils, which can be installed with apt.

$ apt install moreutils

Examples

$ ~/ ll | pee '! /bin/grep Jan | /bin/grep cache' '! /bin/grep Feb | /bin/grep config'
drwxr-xr-x 39 user user 4.0K Jan 27 16:27 .cache/
lrwxrwxrwx  1 user user   61 Feb  9  2016 .config -> /home/myuser/git/configs
lrwxrwxrwx  1 user user   45 Feb  1  2017 .ssh -> .configs/gitdir/.ssh/
drwxr-xr-x 39 user user 4.0K Jan 10 09:01 CACHEdir/
drwxr-xr-x 38 user user 4.0K Feb 13 09:50 configdirectory/