Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <# -------- GO getLastLogsOnly for Shtivi's RDR2 mods -------- #>
- $content = (get-content "Log.log")
- $totalNbLignes = $index = $content.Count
- $latestLogLinesLength = 0
- $outputFilename = "TODAYS-DATE-MAYBEhueheh_lastLogsOnly.log"
- while($index--){
- if($content[$index] -match "^.*Shtivi.*$"){
- break
- }
- }
- $latestLogLinesLength = $totalNbLignes - $index
- Get-content -tail $latestLogLinesLength .\Log.log > $outputFilename
- Start notepad++ $outputFilename
- <# -------- END -------- #>
- <# meeeeh #>
- <# $verbose=false #>
- <# if($verbose) { Write-Host -fore Cyan "index = $index" -nonewline } #>
- <# if($verbose){ Write-Host [$index] -Nonewline } #>
- <# if($verbose){ Write-Host -foregroundColor Yellow "[$index]" } #>
- <# if($verbose) { Write-Host "wewewew" -Nonewline } #>
- <# Write-Host -fore red "Le dernier log commence ligne [$index] et s arrete a [$totalNbLignes]" #>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement