Skip to content

Commit

Permalink
Add additional H2 for redir from native cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwheeler committed Nov 29, 2023
1 parent d686b6f commit cebae69
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can use the following methods to redirect output:

For more information about streams, see [about_Output_Streams][04].

### Redirectable output streams
## Redirectable output streams

PowerShell supports redirection of the following output streams.

Expand All @@ -54,7 +54,7 @@ redirection.
> streams of other shells. However, stdin isn't connected to the PowerShell
> pipeline for input.
### PowerShell redirection operators
## PowerShell redirection operators

The PowerShell redirection operators are as follows, where `n` represents
the stream number. The **Success** stream ( `1` ) is the default if no stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can use the following methods to redirect output:

For more information about streams, see [about_Output_Streams][04].

### Redirectable output streams
## Redirectable output streams

PowerShell supports redirection of the following output streams.

Expand All @@ -54,7 +54,7 @@ redirection.
> streams of other shells. However, stdin isn't connected to the PowerShell
> pipeline for input.
### PowerShell redirection operators
## PowerShell redirection operators

The PowerShell redirection operators are as follows, where `n` represents
the stream number. The **Success** stream ( `1` ) is the default if no stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can use the following methods to redirect output:

For more information about streams, see [about_Output_Streams][04].

### Redirectable output streams
## Redirectable output streams

PowerShell supports redirection of the following output streams.

Expand All @@ -54,7 +54,7 @@ redirection.
> streams of other shells. However, stdin isn't connected to the PowerShell
> pipeline for input.
### PowerShell redirection operators
## PowerShell redirection operators

The PowerShell redirection operators are as follows, where `n` represents
the stream number. The **Success** stream ( `1` ) is the default if no stream
Expand Down
20 changes: 13 additions & 7 deletions reference/7.4/Microsoft.PowerShell.Core/About/about_Redirection.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ You can use the following methods to redirect output:
- Use the PowerShell redirection operators. Redirecting the output of a
PowerShell command (cmdlet, function, script) using the redirection operator
(`>`) is functionally equivalent to piping to `Out-File` with no extra
parameters.

PowerShell 7.4 changed the behavior of the redirection operators when used to
redirect the **stdout** stream of a native command. For more information, see
[Example #7](#example-7-redirecting-binary-data-from-a-native-command).
parameters. PowerShell 7.4 changed the behavior of the redirection operator
when used to redirect the **stdout** stream of a native command.

For more information about streams, see [about_Output_Streams][04].

### Redirectable output streams
## Redirectable output streams

PowerShell supports redirection of the following output streams.

Expand All @@ -59,7 +56,7 @@ redirection.
> streams of other shells. However, stdin isn't connected to the PowerShell
> pipeline for input.
### PowerShell redirection operators
## PowerShell redirection operators

The PowerShell redirection operators are as follows, where `n` represents
the stream number. The **Success** stream ( `1` ) is the default if no stream
Expand All @@ -75,6 +72,15 @@ is specified.
> Unlike some Unix shells, you can only redirect other streams to the
> **Success** stream.
## Redirecting output from native commands

PowerShell 7.4 changed the behavior of the redirection operators when used to
redirect the **stdout** stream of a native command. PowerShell 7.4 changed the
behavior. The redirection operators now preserve the byte-stream data when
redirecting output from a native command. PowerShell doesn't interpret the
redirected data or add any additional formatting. For more information, see
[Example #7](#example-7-redirecting-binary-data-from-a-native-command).

## Examples

### Example 1: Redirect errors and output to a file
Expand Down

0 comments on commit cebae69

Please sign in to comment.