PowerShell equivalent to grep -f

前端 未结 9 1611
情书的邮戳
情书的邮戳 2020-12-22 16:09

I\'m looking for the PowerShell equivalent to grep --file=filename. If you don\'t know grep, filename is a text file where each line has a regular

9条回答
  •  有刺的猬
    2020-12-22 16:16

    This question already has an answer, but I just want to add that in Windows there is Windows Subsystem for Linux WSL.

    So for example if you want to check if you have service named Elasicsearch that is in status running you can do something like the snippet below in powershell

    net start | grep Elasticsearch

提交回复
热议问题