Created
May 21, 2025 13:09
-
-
Save sofferm/275d2e15048876f2886742de09980f95 to your computer and use it in GitHub Desktop.
Finde einen Text in einem Haufen Logdateien
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # finde Text in einem Haufen Logdateien | |
| $suchstring = "java.lang.NullPointerException: null" | |
| $suchstring = "Während der Verarbeitung kam es zu einem unerwarteten Serverfehler" | |
| $suchstring = "Hier könnte ihr Suchstring stehen" | |
| cd $PSScriptRoot | |
| foreach ($f in Get-ChildItem -Filter "*.log") | |
| { | |
| Select-String -path "$f" -SimpleMatch "$suchstring" #-Context 0,1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment