PowerShell Grep Sed

If you’re familiar with grep and sed on Linux, you may come to miss them in a Windows environment (although the WSL subsystem / GNU tools for Windows exist, so…). Thankfully, with Powershell we have equally competent tools at hand. Select-String -Pattern ‘myRegexPattern’ -Path ‘fileToSearch.txt’ -AllMatches | % { $_.Matches.Value -replace “old”,”new” } Select-String¬†will take […]

Read More