Skip to content

Instantly share code, notes, and snippets.

@RhysC
Created January 5, 2011 11:06
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 RhysC/766183 to your computer and use it in GitHub Desktop.
Save RhysC/766183 to your computer and use it in GitHub Desktop.
PS Script that shows all txt lines in files that contain the given pattern (not recursive))
#Need to define $pattern
get-childitem . | get-childitem | select-string -pattern $pattern | foreach {$_.line}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment