LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pee

tees stdin to multiple commands

TLDR

Pipe to multiple commands
$ echo "data" | pee [cmd1] [cmd2]
copy
Tee to processes
$ cat [file] | pee "wc -l" "wc -w"
copy
Process and save
$ cat [log] | pee "grep error" "cat > copy.log"
copy

SYNOPSIS

pee [command...]

DESCRIPTION

pee tees stdin to multiple commands. Like tee but to processes.The tool duplicates input to commands. Part of moreutils.

PARAMETERS

COMMAND

Commands to receive input.
Each command receives a copy of stdin.

INSTALL

sudo apt install moreutils
copy
sudo dnf install moreutils
copy
sudo pacman -S moreutils
copy
sudo apk add moreutils
copy
sudo zypper install moreutils
copy
brew install moreutils
copy
nix profile install nixpkgs#moreutils
copy

CAVEATS

Part of moreutils. Each command gets full input. Parallel execution.

HISTORY

pee is part of moreutils for piping to multiple processes.

SEE ALSO

tee(1), moreutils(7)

Copied to clipboard
Kai