Created
September 14, 2021 13:08
-
-
Save karthiks/219b8207735426ad671df03d23e2e349 to your computer and use it in GitHub Desktop.
Case 2: When you want to list files containing any of texts "abc" or "pqr" or "xyz".
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-ChildItem -Recurse | Select-String -Pattern 'abc', 'pqr', 'xyz' -List | Select Path | |
# Select-String commandlet can take an array list of strings that it can search for existence and returns all files that has any of those strings in its content. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment