tee
v(uutils coreutils) 0.1.0
Options
--help,-h-
tee-help-help
--append,-a-
tee-help-append
--ignore-interrupts,-i-
tee-help-ignore-interrupts
-p-
tee-help-ignore-pipe-errors
--output-error-
tee-help-output-error
Examples
Copy stdin to each file, and also to stdout:
echo "example" | tee {{path/to/file}}
Append to the given files, do not overwrite:
echo "example" | tee {{[-a|--append]}} {{path/to/file}}
Print stdin to the terminal, and also pipe it into another program for further processing:
echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}
Create a directory called "example", count the number of characters in "example" and write "example" to the terminal:
echo "example" | tee >(xargs mkdir) >(wc {{[-c|--bytes]}})
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.