You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, it's common to use error stream (2) as an information stream.
There is no errors in this case, it's just a way to report info.
When PowerShell redirects error stream, it wraps all output from stream 2 in NativeCommandError ErrorRecord.
That doesn't happen for interactive experience (when there is no redirection), but it shows up in logs, scripting and non-console powershell hosts (i.e. PowerShell ISE).
Steps to reproduce
grep 2>txt
cat txt
On windows, you can use grep that comes with git to do the same.
Expected behavior
Usage: /usr/bin/grep [OPTION]... PATTERN [FILE]...
Try '/usr/bin/grep --help' for more information.
Activity
vors commentedon Jul 26, 2016
Per discussion with Jason Shirk (@lzybkr) , we will do this change for public release
Change formatter for ErrorRecord