stdin
から読み込んでstdout
とファイル(またはコマンド)に書き込みます。 もっと詳しく: https://www.gnu.org/software/coreutils/manual/html_node/tee-invocation.html。
stdin
をコピーし、stdout
にもコピーする:echo "example" | tee {{path/to/file}}
echo "example" | tee -a {{path/to/file}}
stdin
を表示し、さらに処理するために別のプログラムにパイプする:echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}
echo "example" | tee >(xargs mkdir) >(wc -c)