Prerequisites
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.txt
Expected 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
3
Actual behavior
Get-Content file.txt -Head -3
Get-Content file.txt -Tail -3
1
2
3
4
5
6
Error 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.0
Visuals
No response
Prerequisites
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:
Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response