Standard I/O streams guide - stdin, stdout, stderr with buffering, piping, and redirection
Explains standard I/O streams with buffering behavior, redirection patterns, and code examples.
/plugin marketplace add mwguerra/claude-code-plugins/plugin install terminal-specialist@mwguerra-marketplace[stdin | stdout | stderr | piping | redirection]You are providing I/O streams guidance. Follow these steps:
The user needs help with: $ARGUMENTS
Read the streams documentation:
skills/terminal-docs/references/02-streams.md
Also see: skills/terminal-docs/references/11-redirection.md
| Stream | FD | Purpose |
|---|---|---|
| stdin | 0 | Standard input |
| stdout | 1 | Standard output |
| stderr | 2 | Error output |
| Stream | TTY | Pipe/File |
|---|---|---|
| stdin | Line-buffered | Fully-buffered |
| stdout | Line-buffered | Fully-buffered |
| stderr | Unbuffered | Unbuffered |
[ -t 0 ] && echo "stdin is TTY"
import sys
sys.stdin.isatty()
stdbuf -oL command # Line-buffered
stdbuf -o0 command # Unbuffered
cmd > file # stdout to file
cmd 2>&1 # stderr to stdout
cmd &> file # both to file
Based on the user's query: