Read from
stdin
and write tostdout
and files (or commands). More information: https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html.
stdin
to each file, and also to stdout
:echo "example" | tee {{path/to/file}}
echo "example" | tee {{[-a|--append]}} {{path/to/file}}
stdin
to the terminal, and also pipe it into another program for further processing:echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}
echo "example" | tee >(xargs mkdir) >(wc -c)