1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-28 11:35:27 +02:00
tldr/pages.ja/common/tee.md
Managor a70b923d8f
*: add option placeholders to translations (#15933)
Co-authored-by: Darío Hereñú <magallania@gmail.com>
2025-03-19 00:36:34 +02:00

20 lines
832 B
Markdown

# tee
> `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|--append]}} {{path/to/file}}`
- ターミナルに `stdin` を表示し、さらに処理するために別のプログラムにパイプする:
`echo "example" | tee {{/dev/tty}} | {{xargs printf "[%s]"}}`
- "example"と言うディレクトリを作成し、"example"の文字バイト数を数え、"example"をターミナルに出力する:
`echo "example" | tee >(xargs mkdir) >(wc -c)`