Windows · Command Prompt
Pipes
Cheat sheet · https://pcornel.dk/topic.php?topic=3056
Answer
Pipes (|) send one command's output into another's input in cmd, such as ipconfig /all | findstr IPv4 or netstat -ano | find "443", to filter or chain results.
Remember
- Pipes pass text, not objects.
- Use findstr to filter lines.
- Errors (stream 2) are not piped unless redirected with 2>&1.
First checks
echo %PATH%— PATH in CMDset— environment variableswhere <name>— command resolutionecho %ERRORLEVEL%— exit code
Verify in this order
cmd1 stdout → pipe → cmd2 stdin → output
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3056