I have a log file(.log) which is huge. I'm trying to find few keywords which need to be highlighted so that I can skip through other lines in the log faster. But, I don't want to filter only the select-string but highlight select-string. Also, I have no Idea about Powershell, I have the below command so far, from googling.
C:\users\proto> cat txtlog.log select-string "Valid" | write-host -foregroundcolor red
Which doesn't output what I want as it's only returning "valid" lines in red color but not the other lines.
git diff --color-words
would do this. I don't know how to do that with PowerShell. The Format-Color function suggested gets closer.Select-String
by color?