I have a two text files. One has 25 lines, the other has 1 line. Let's call them $big and $small, respectively.
This returns the correct results:
PS C:>(Get-Content $big).count
PS C:>25
But this returns no results:
PS C:>(Get-Content $small).count
Why is the single line file not being seen as such?
line count in txt file
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 107
- Last visit: Thu Apr 29, 2021 8:47 am
line count in txt file
I have a two text files. One has 25 lines, the other has 1 line. Let's call them $big and $small, respectively.
This returns the correct results:
PS C:>(Get-Content $big).count
PS C:>25
But this returns no results:
PS C:>(Get-Content $small).count
Why is the single line file not being seen as such?
This returns the correct results:
PS C:>(Get-Content $big).count
PS C:>25
But this returns no results:
PS C:>(Get-Content $small).count
Why is the single line file not being seen as such?
Mike