Return to Snippet

Revision: 37732
at December 16, 2010 08:22 by michanne


Initial Code
Select-string $file -pattern 'TOTALS:' | select -first 3 |foreach {(get-content $file -totalcount ($_.linenumber +4))[-5,-3,-1]}

Initial URL


Initial Description


Initial Title
Searches for a string in file and returns the lines per array

Initial Tags


Initial Language
Windows PowerShell