Last active
October 13, 2018 01:07
-
-
Save LiamHz/edabcb06bb91a338317b66288ff58208 to your computer and use it in GitHub Desktop.
Search through current directory for any matches of specified text
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
# Search through current directory and all sub directories for text | |
dir -Recurse | Select-String -pattern "STRING" | |
# Recursive search and table formatting | |
dir -Recurse | Select-String -pattern "latest_net_G" | Select Path, LineNumber, Line | Format-Table | |
# Search through all files with the .EXT extension in the current directory | |
# and find any lines that match with STRING | |
Select-String -Path *.EXT -Pattern "STRING" | |
# Table formatting | |
Select-String -Path *.py -Pattern "fc3" | Select Filename, LineNumber, Line, Path | Format-Table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment