Skip to content

Instantly share code, notes, and snippets.

@trauber
Last active October 12, 2015 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trauber/a62046a218f7d8f034ee to your computer and use it in GitHub Desktop.
Save trauber/a62046a218f7d8f034ee to your computer and use it in GitHub Desktop.
grep-like posh Select-String Pipe

As close to grep as I have found so far:

<some-cmd> | Out-String -Stream | Select-String [options] <some-string>

Select-String's -Context option works pretty well ... so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment