KEMBAR78
Get-Content -reverse ( aka tac in linux) · Issue #11086 · PowerShell/PowerShell · GitHub
Skip to content

Get-Content -reverse ( aka tac in linux) #11086

@i5513

Description

@i5513

Sometimes you need search a word starting from the end of the file (surely a log file)

At Linux you can use standard tac command:

tac xxxx | filter | tac

So you have the tail of the file filtered like you Want. The simple case is when filter is grep -m1 searchedword

I think Get-content could have -reverse option which would read the file from the finish

What do you think? See https://www.reddit.com/r/PowerShell/comments/dwuz96/large_csv_file/f7ma6g1?utm_medium=android_app&utm_source=share for a real example

Thank you!

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 moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions