grep command for Powershell users
As a former unix user, I wanted to have a similar (single) command to search for content in files in my scripting environment, which is the Powershell. The solution is a pretty simple usage of the two cmdlets Get-ChildItem and Select-String:
Put this function in to your Powershell profile.ps1 and use it like this:
In this example the grep command will search all *.txt files in the current directory and all subdirectories, which have ‘findme’ in their content.
Have fun and happy searching!
Written on March 5, 2018