tee
Read from
stdinand write tostdoutand files (or commands). More information: https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html.
- Copy
stdinto each file, and also tostdout:
echo "example" | tee
- Append to the given files, do not overwrite:
echo "example" | tee
- Print
stdinto the terminal, and also pipe it into another program for further processing:
echo "example" | tee |
- Create a directory called "example", count the number of characters in "example", and write "example" to the terminal:
echo "example" | tee >(xargs mkdir) >(wc )
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
