Skip to content

Commit 597ea7c

Browse files
Fix minor typos in about_Switch (#11822)
1 parent 120526d commit 597ea7c

File tree

4 files changed

+48
-48
lines changed

4 files changed

+48
-48
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Switch.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ conditions. It's equivalent to an `else` clause in an `if` statement. Only one
110110
comparison is case-insensitive.
111111
- **CaseSensitive** - Performs a case-sensitive match. If the match clause is
112112
not a string, this parameter is ignored.
113-
- **File**- Takes input from a file rather than a `<test-expression>`. The file
114-
is read a line at a time and evaluated by the `switch` statement. By default,
115-
the comparison is case-insensitive. The **File** parameter only supports one
116-
file. If multiple **File** parameters are included, only the last one is
117-
used.For more information see [File parameter examples][01].
113+
- **File** - Takes input from a file rather than a `<test-expression>`. The
114+
file is read a line at a time and evaluated by the `switch` statement. By
115+
default, the comparison is case-insensitive. The **File** parameter only
116+
supports one file. If multiple **File** parameters are included, only the
117+
last one is used. For more information see [File parameter examples][01].
118118
- **Regex** - Performs regular expression matching of the value to the
119119
condition. If the match clause isn't a string, this parameter is ignored.
120-
The comparison is case-insensitive. The `$matches` automatic variable is
120+
The comparison is case-insensitive. The `$Matches` automatic variable is
121121
available for use within the matching statement block.
122122

123123
> [!NOTE]
@@ -327,7 +327,7 @@ switch -Regex ($target) {
327327
}
328328
'^(http[s]?)\://.*$'
329329
{
330-
"$_ is a web address that uses $($matches[1])"
330+
"$_ is a web address that uses $($Matches[1])"
331331
break
332332
}
333333
}
@@ -401,12 +401,12 @@ Using the `switch` statement with the **File** parameter is an efficient way to
401401
process large files line by line. PowerShell streams the lines of the file to
402402
the `switch` statement. Each line is processed individually.
403403

404-
You can terminate
405-
the processing before reaching the end of the file by using the `break` keyword
406-
in the action statement. The `switch` statement is more efficient than using
407-
`Get-Content` to process large files line by line.
404+
You can terminate the processing before reaching the end of the file by using
405+
the `break` keyword in the action statement. The `switch` statement is more
406+
efficient than using `Get-Content` to process large files line by line.
408407

409-
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and efficient line-by-line pattern matching.
408+
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and
409+
efficient line-by-line pattern matching.
410410

411411
The following example reads the `README.md` in the PowerShell-Docs repository.
412412
It outputs each line until it reaches the line that starts with `##`.

reference/7.4/Microsoft.PowerShell.Core/About/about_Switch.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ conditions. It's equivalent to an `else` clause in an `if` statement. Only one
110110
comparison is case-insensitive.
111111
- **CaseSensitive** - Performs a case-sensitive match. If the match clause is
112112
not a string, this parameter is ignored.
113-
- **File**- Takes input from a file rather than a `<test-expression>`. The file
114-
is read a line at a time and evaluated by the `switch` statement. By default,
115-
the comparison is case-insensitive. The **File** parameter only supports one
116-
file. If multiple **File** parameters are included, only the last one is
117-
used.For more information see [File parameter examples][01].
113+
- **File** - Takes input from a file rather than a `<test-expression>`. The
114+
file is read a line at a time and evaluated by the `switch` statement. By
115+
default, the comparison is case-insensitive. The **File** parameter only
116+
supports one file. If multiple **File** parameters are included, only the
117+
last one is used. For more information see [File parameter examples][01].
118118
- **Regex** - Performs regular expression matching of the value to the
119119
condition. If the match clause isn't a string, this parameter is ignored.
120-
The comparison is case-insensitive. The `$matches` automatic variable is
120+
The comparison is case-insensitive. The `$Matches` automatic variable is
121121
available for use within the matching statement block.
122122

123123
> [!NOTE]
@@ -327,7 +327,7 @@ switch -Regex ($target) {
327327
}
328328
'^(http[s]?)\://.*$'
329329
{
330-
"$_ is a web address that uses $($matches[1])"
330+
"$_ is a web address that uses $($Matches[1])"
331331
break
332332
}
333333
}
@@ -401,12 +401,12 @@ Using the `switch` statement with the **File** parameter is an efficient way to
401401
process large files line by line. PowerShell streams the lines of the file to
402402
the `switch` statement. Each line is processed individually.
403403

404-
You can terminate
405-
the processing before reaching the end of the file by using the `break` keyword
406-
in the action statement. The `switch` statement is more efficient than using
407-
`Get-Content` to process large files line by line.
404+
You can terminate the processing before reaching the end of the file by using
405+
the `break` keyword in the action statement. The `switch` statement is more
406+
efficient than using `Get-Content` to process large files line by line.
408407

409-
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and efficient line-by-line pattern matching.
408+
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and
409+
efficient line-by-line pattern matching.
410410

411411
The following example reads the `README.md` in the PowerShell-Docs repository.
412412
It outputs each line until it reaches the line that starts with `##`.

reference/7.5/Microsoft.PowerShell.Core/About/about_Switch.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ conditions. It's equivalent to an `else` clause in an `if` statement. Only one
110110
comparison is case-insensitive.
111111
- **CaseSensitive** - Performs a case-sensitive match. If the match clause is
112112
not a string, this parameter is ignored.
113-
- **File**- Takes input from a file rather than a `<test-expression>`. The file
114-
is read a line at a time and evaluated by the `switch` statement. By default,
115-
the comparison is case-insensitive. The **File** parameter only supports one
116-
file. If multiple **File** parameters are included, only the last one is
117-
used.For more information see [File parameter examples][01].
113+
- **File** - Takes input from a file rather than a `<test-expression>`. The
114+
file is read a line at a time and evaluated by the `switch` statement. By
115+
default, the comparison is case-insensitive. The **File** parameter only
116+
supports one file. If multiple **File** parameters are included, only the
117+
last one is used. For more information see [File parameter examples][01].
118118
- **Regex** - Performs regular expression matching of the value to the
119119
condition. If the match clause isn't a string, this parameter is ignored.
120-
The comparison is case-insensitive. The `$matches` automatic variable is
120+
The comparison is case-insensitive. The `$Matches` automatic variable is
121121
available for use within the matching statement block.
122122

123123
> [!NOTE]
@@ -327,7 +327,7 @@ switch -Regex ($target) {
327327
}
328328
'^(http[s]?)\://.*$'
329329
{
330-
"$_ is a web address that uses $($matches[1])"
330+
"$_ is a web address that uses $($Matches[1])"
331331
break
332332
}
333333
}
@@ -401,12 +401,12 @@ Using the `switch` statement with the **File** parameter is an efficient way to
401401
process large files line by line. PowerShell streams the lines of the file to
402402
the `switch` statement. Each line is processed individually.
403403

404-
You can terminate
405-
the processing before reaching the end of the file by using the `break` keyword
406-
in the action statement. The `switch` statement is more efficient than using
407-
`Get-Content` to process large files line by line.
404+
You can terminate the processing before reaching the end of the file by using
405+
the `break` keyword in the action statement. The `switch` statement is more
406+
efficient than using `Get-Content` to process large files line by line.
408407

409-
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and efficient line-by-line pattern matching.
408+
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and
409+
efficient line-by-line pattern matching.
410410

411411
The following example reads the `README.md` in the PowerShell-Docs repository.
412412
It outputs each line until it reaches the line that starts with `##`.

reference/7.6/Microsoft.PowerShell.Core/About/about_Switch.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ conditions. It's equivalent to an `else` clause in an `if` statement. Only one
110110
comparison is case-insensitive.
111111
- **CaseSensitive** - Performs a case-sensitive match. If the match clause is
112112
not a string, this parameter is ignored.
113-
- **File**- Takes input from a file rather than a `<test-expression>`. The file
114-
is read a line at a time and evaluated by the `switch` statement. By default,
115-
the comparison is case-insensitive. The **File** parameter only supports one
116-
file. If multiple **File** parameters are included, only the last one is
117-
used.For more information see [File parameter examples][01].
113+
- **File** - Takes input from a file rather than a `<test-expression>`. The
114+
file is read a line at a time and evaluated by the `switch` statement. By
115+
default, the comparison is case-insensitive. The **File** parameter only
116+
supports one file. If multiple **File** parameters are included, only the
117+
last one is used. For more information see [File parameter examples][01].
118118
- **Regex** - Performs regular expression matching of the value to the
119119
condition. If the match clause isn't a string, this parameter is ignored.
120-
The comparison is case-insensitive. The `$matches` automatic variable is
120+
The comparison is case-insensitive. The `$Matches` automatic variable is
121121
available for use within the matching statement block.
122122

123123
> [!NOTE]
@@ -327,7 +327,7 @@ switch -Regex ($target) {
327327
}
328328
'^(http[s]?)\://.*$'
329329
{
330-
"$_ is a web address that uses $($matches[1])"
330+
"$_ is a web address that uses $($Matches[1])"
331331
break
332332
}
333333
}
@@ -401,12 +401,12 @@ Using the `switch` statement with the **File** parameter is an efficient way to
401401
process large files line by line. PowerShell streams the lines of the file to
402402
the `switch` statement. Each line is processed individually.
403403

404-
You can terminate
405-
the processing before reaching the end of the file by using the `break` keyword
406-
in the action statement. The `switch` statement is more efficient than using
407-
`Get-Content` to process large files line by line.
404+
You can terminate the processing before reaching the end of the file by using
405+
the `break` keyword in the action statement. The `switch` statement is more
406+
efficient than using `Get-Content` to process large files line by line.
408407

409-
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and efficient line-by-line pattern matching.
408+
You can combine `switch -File` with `-Wildcard` or `-Regex` for flexible and
409+
efficient line-by-line pattern matching.
410410

411411
The following example reads the `README.md` in the PowerShell-Docs repository.
412412
It outputs each line until it reaches the line that starts with `##`.

0 commit comments

Comments
 (0)