A PowerShell file system searching utility.
Name and function fully inspired by grep (globally search for a regular expression and print).
Search for a regular expression in the current working directory:
psrep '\s*Reg.+arExpressions\*'
Search a directory:
psrep 'Pattern' -Directory 'c:\repos\psrep'
Search a file:
psrep 'Pattern' -FilePath 'c:\repos\psrep\psrep.psm1'
Search for multiple patterns:
psrep 'Pattern1', 'Pattern2'
Search multiple directories:
psrep 'Pattern' -Directory 'c:\repos\psrep', 'c:\temp\notes'
Search multiple files:
psrep 'Pattern' -FilePath 'c:\repos\psrep\psrep.psm1', 'c:\temp\notes\psrep-notes.txt'
Search directories and files (multiple of each still works):
psrep 'Pattern' -Directory 'c:\repos\psrep' -FilePath 'c:\temp\notes\psrep-notes.txt'
Option 1: Clone the repo to a PowerShell modules folder:
cd c:\users\<your username>\Documents\PowerShell\Modules
git clone https://github.com/davidknise/psrep.git
PowerShellGet support coming soon.
After installing, make sure you can get psrep
when you open a PowerShell prompt.
Option 1: Import the module in your PowerShell profile
- Create a edit the file at:
c:\users\<your username>\Documents\PowerShell\Modules\profile.ps1
- Add
Import-Module psrep
Option 2: Import the module in your PowerShell profile
- Create a edit the file at:
c:\users\<your username>\Documents\PowerShell\Modules\profile.ps1
- Add
Import-Module psrep
PowerShellGet support coming soon.