From 0e4a3839018ba2ac228be81ae54c899a91390982 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Fri, 19 Apr 2019 16:27:19 -0700 Subject: [PATCH] Fix #4168 - clarify $input (#4182) --- .../Microsoft.PowerShell.Core/About/about_Functions.md | 9 +++++---- .../Microsoft.PowerShell.Core/About/about_Functions.md | 9 +++++---- .../Microsoft.PowerShell.Core/About/about_Functions.md | 9 +++++---- .../Microsoft.PowerShell.Core/About/about_Functions.md | 9 +++++---- .../6/Microsoft.PowerShell.Core/About/about_Functions.md | 9 +++++---- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md index 124691ff910a..adfaa78ebee1 100644 --- a/reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md @@ -431,11 +431,12 @@ Begin: The input is End: The input is 1 2 4 ``` -When the `Begin` statement runs, the function does not have the input from -the pipeline. The `End` statement runs after the function has the values. +When the `Begin` statement runs, the function does not have the input from the +pipeline. The `End` statement runs after the function has the values. -If the function has a `Process` keyword, the function reads the data in -`$input`. The following example has a `Process` statement list: +If the function has a `Process` keyword, each object in `$input` is removed +from `$input` and assigned to `$_`. The following example has a `Process` +statement list: ```powershell function Get-PipelineInput diff --git a/reference/4.0/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/4.0/Microsoft.PowerShell.Core/About/about_Functions.md index 124691ff910a..adfaa78ebee1 100644 --- a/reference/4.0/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/4.0/Microsoft.PowerShell.Core/About/about_Functions.md @@ -431,11 +431,12 @@ Begin: The input is End: The input is 1 2 4 ``` -When the `Begin` statement runs, the function does not have the input from -the pipeline. The `End` statement runs after the function has the values. +When the `Begin` statement runs, the function does not have the input from the +pipeline. The `End` statement runs after the function has the values. -If the function has a `Process` keyword, the function reads the data in -`$input`. The following example has a `Process` statement list: +If the function has a `Process` keyword, each object in `$input` is removed +from `$input` and assigned to `$_`. The following example has a `Process` +statement list: ```powershell function Get-PipelineInput diff --git a/reference/5.0/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/5.0/Microsoft.PowerShell.Core/About/about_Functions.md index 124691ff910a..adfaa78ebee1 100644 --- a/reference/5.0/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/5.0/Microsoft.PowerShell.Core/About/about_Functions.md @@ -431,11 +431,12 @@ Begin: The input is End: The input is 1 2 4 ``` -When the `Begin` statement runs, the function does not have the input from -the pipeline. The `End` statement runs after the function has the values. +When the `Begin` statement runs, the function does not have the input from the +pipeline. The `End` statement runs after the function has the values. -If the function has a `Process` keyword, the function reads the data in -`$input`. The following example has a `Process` statement list: +If the function has a `Process` keyword, each object in `$input` is removed +from `$input` and assigned to `$_`. The following example has a `Process` +statement list: ```powershell function Get-PipelineInput diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md index 124691ff910a..adfaa78ebee1 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md @@ -431,11 +431,12 @@ Begin: The input is End: The input is 1 2 4 ``` -When the `Begin` statement runs, the function does not have the input from -the pipeline. The `End` statement runs after the function has the values. +When the `Begin` statement runs, the function does not have the input from the +pipeline. The `End` statement runs after the function has the values. -If the function has a `Process` keyword, the function reads the data in -`$input`. The following example has a `Process` statement list: +If the function has a `Process` keyword, each object in `$input` is removed +from `$input` and assigned to `$_`. The following example has a `Process` +statement list: ```powershell function Get-PipelineInput diff --git a/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md b/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md index 124691ff910a..adfaa78ebee1 100644 --- a/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md +++ b/reference/6/Microsoft.PowerShell.Core/About/about_Functions.md @@ -431,11 +431,12 @@ Begin: The input is End: The input is 1 2 4 ``` -When the `Begin` statement runs, the function does not have the input from -the pipeline. The `End` statement runs after the function has the values. +When the `Begin` statement runs, the function does not have the input from the +pipeline. The `End` statement runs after the function has the values. -If the function has a `Process` keyword, the function reads the data in -`$input`. The following example has a `Process` statement list: +If the function has a `Process` keyword, each object in `$input` is removed +from `$input` and assigned to `$_`. The following example has a `Process` +statement list: ```powershell function Get-PipelineInput