tee
Duplicate stdin to both files and stdout simultaneously. Use to capture intermediate pipeline data while allowing data to pass through. Supports append and dry-run preview.
Instructions
Read stdin and write simultaneously to files and stdout with dry-run and append support. Destructive: writes to specified output files. Use --dry_run to preview. Use --append to add to files instead of overwriting. Returns JSON with output paths and byte counts. Use to capture intermediate pipeline data while passing it through. Not for simple file writing without passthrough — use redirection or 'cp'. For secure overwriting use 'shred'. See also 'cat', 'echo'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | Append instead of replacing. | |
| dry_run | No | Report operations without writing files. | |
| max_preview_bytes | No | Maximum JSON preview bytes. | |
| parents | No | Create missing parent directories. | |
| paths | No | Files to write. | |
| raw | No | Echo stdin to stdout without a JSON envelope. |