Skip to content

Additional Parameters for Get-Content #11750

@scotthardwick

Description

@scotthardwick

It would be useful for Get-Content to have
-Skip
-SkipLast
in the same fashion that Select-Object has.

This would allow you to skip over initial lines you did not want, rather than take the performance and memory hit of loading the entire file into an initial variable and then doing a select.
$Content = Get-content $myTextFile | select-object -skip 500

Currently both Get-Content and Select-Object have a -First and -Last. But only Select-Object has -Skip and -SkipLast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or more

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions