Last active
August 29, 2015 14:00
-
-
Save TearTheSky/11135100 to your computer and use it in GitHub Desktop.
テキストエディタでいう、「フォルダ内を検索」のようなもの
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$searchKey = "keyword which you want to search" | |
$outFileName = "result.txt" | |
$Items = get-childitem | |
foreach($aItem in $Items) { | |
$aLog = get-content $aItem | |
$results = @($aLog | select-string $searchKey) | |
$results | out-file $outFileName -append | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment