Skip to content

Commit 66f2f42

Browse files
Update Get-Content.md
1 parent 782b1fe commit 66f2f42

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

reference/7.5/Microsoft.PowerShell.Management/Get-Content.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Get-Content -Path .\LineNumbers.txt
6060
```
6161

6262
```Output
63-
This is Line 1
64-
This is Line 2
63+
This is Line 1.
64+
This is Line 2.
6565
...
6666
This is line 99.
6767
This is line 100.
@@ -83,11 +83,11 @@ Get-Content -Path .\LineNumbers.txt -TotalCount 5
8383
```
8484

8585
```Output
86-
This is Line 1
87-
This is Line 2
88-
This is Line 3
89-
This is Line 4
90-
This is Line 5
86+
This is Line 1.
87+
This is Line 2.
88+
This is Line 3.
89+
This is Line 4.
90+
This is Line 5.
9191
```
9292

9393
### Example 3: Get a specific line of content from a text file
@@ -101,7 +101,7 @@ that content. The **TotalCount** parameter gets the first 25 lines of content. T
101101
```
102102

103103
```Output
104-
This is Line 25
104+
This is Line 25.
105105
```
106106

107107
The `Get-Content` command is wrapped in parentheses so that the command completes before going to
@@ -119,7 +119,7 @@ Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1
119119
```
120120

121121
```Output
122-
This is Line 100
122+
This is Line 100.
123123
```
124124

125125
This example uses the `Get-Item` cmdlet to demonstrate that you can pipe files to `Get-Content`. The

0 commit comments

Comments
 (0)