Created
February 25, 2016 16:45
-
-
Save hperantunes/43daf6709f62571aaad2 to your computer and use it in GitHub Desktop.
tail + grep powershell equivalent
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
Get-Content C:\temp\mylogfile.log -tail 100 –wait | Select-String 'search' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a fast alternative for linux/unix grep you could also try the
psitems
powershell module. It includes apsgrep
command (alias forFind-ItemContent
) that works similar to the linux/unixgrep
command (the basic way, only a few parameters of original grep included).(above command searches for pattern test in all files in current directory recursively (
-R
) and highlights the results (-H
))Fore more information check the README.