PowerShell: Deleting entire lines in a text file based on a partial string match

11 07 2011

PS C:\workspace> (gc “fileToParse.txt”) -notmatch "<criteria>" | out-file
"resultFile.txt"

Note: <Criteria>, for example, “not".


Actions

Informations

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>