📜  grep powershell - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:11.093000             🧑  作者: Mango

代码示例1
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"