-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
SYSTEMATIC REVIEW by @mklement0
Get-Content -Head and -Tail should behave like head and tail with negative parameters, I checked the code and this is by design but I think its not the corect behaviour.
https://www.gnu.org/software/coreutils/manual/html_node/head-invocation.html
https://www.gnu.org/software/coreutils/manual/html_node/tail-invocation.html
Create txt file:
@"
1
2
3
4
5
6
"@ | Set-Content file.txtExpected behavior
Get-Content file.txt -Head -3
head file.txt -n-3
4
5
6
Get-Content file.txt -Tail -3
tail file.txt -n-3
1
2
3Actual behavior
Get-Content file.txt -Head -3
Get-Content file.txt -Tail -3
1
2
3
4
5
6Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
No response
mklement0
Metadata
Metadata
Assignees
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdletsgeneral cmdlet issuesgeneral cmdlet issues