Timeline for How can I both pipe and display output in Windows' command line?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 25, 2014 at 18:59 | comment | added | Eris |
In powershell you can do redirection *>&1 will redirect all output to 'stdout'
|
|
Jun 12, 2014 at 2:51 | comment | added | Bob | @BenjiWiebe Yes, it looks like it should work. I'm just going to use my PowerShell script for now, since that saves me having to add an extra binary, but have an upvote for a good solution :) | |
Jun 12, 2014 at 2:48 | history | edited | Bob | CC BY-SA 3.0 |
added 277 characters in body
|
Jun 12, 2014 at 2:39 | comment | added | BenjiWiebe | Do you mean to say my code would actually work!? :) | |
Jun 12, 2014 at 2:38 | comment | added | Bob | @BenjiWiebe Ah, yea, what I meant is there's no direct equivalent in Windows that exposes file descriptors as device files. Writing a program that just prints to those would work, yes. | |
Jun 12, 2014 at 2:20 | comment | added | BenjiWiebe | See my answer for an explanation of what I was thinking (and it MIGHT WORK!) | |
Jun 12, 2014 at 2:16 | comment | added | BenjiWiebe |
Programmatically speaking, /dev/stderr is a kernel concept that redirects stuff to the file descriptor for stderr . Would there not be a way in Windows to redirect to stderr (NOT /dev/stderr )?
|
|
Jun 12, 2014 at 2:14 | comment | added | Bob |
@BenjiWiebe /dev/stderr , correct? That doesn't exist on Windows, as far as I know. Something with named pipes would be possible, but I'm trying to avoid writing a program just for this purpose!
|
|
Jun 12, 2014 at 2:03 | comment | added | BenjiWiebe |
On *nix, I always tee to stderr ; is there a way to tee to both stderr and stdout in PowerShell, or does Windows/PowerShell not have that concept?
|
|
Jun 12, 2014 at 1:39 | comment | added | Bob | I'm still looking for a way to do this without a temporary file within the basic (non-PowerShell) command line, if possible. | |
Jun 12, 2014 at 1:38 | history | answered | Bob | CC BY-SA 3.0 |