For When You Can't Have The Real Thing
[ start | index | login ]
start > Windows > Powershell > grep

grep

Created by dave. Last edited by dave, 6 years and 82 days ago. Viewed 1,501 times. #1
[edit] [rdf]
labels
attachments

The Powershell Equivalent Of grep

Unix:

# command | grep pattern

Powershell:

> (command|out-string) -split "`n" | select-string $STRING

While this may be more flexible, it fails in the simplest cases.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt