Answers for "grep powershell equivalent"

4

grep powershell

To grep in powershell use Select-String. Select-String uses regex wildcards
so you have to use .* instead of only * (for instance). You can also specify
path.

ls | Select-String -Pattern ".*Anders.*"

ls | Select-String -Path ".*Code.*" -Pattern ".*.cs"
Posted by: Guest on May-17-2021

Browse Popular Code Answers by Language