Prints matches of a Regex Pattern along with their corresponding line number.
File or Directory to search for matches. Directory will not recurse. To recurse, use pipeline.
Mandatory Regex Pattern to search the given input for matches.
Returns a hashtable object, see Outputs for more information.
This module accepts pipeline input objects from Get-ChildItem. Use of other pipeline inputs may have unexpected execution.
Color coded output with line numbers and pattern matches.
Returns a hashtable object with the following format:
Key Value
FileName { Key Value }
{ <LineNumber>=<PatternMatch> }
-
Search file
resultsfornc.Find-Lines -Path results -Pattern 'nc'
-
Search files in
DesktopforncFind-Lines -Path ~/Desktop -Pattern 'nc'
-
Search recursivly through the users
Documentsdirectory forncls -R ~/Documents | Find-Lines -Pattern nc Get-ChildItem -Recurse ~/Documents | Find-Lines -Pattern nc
git clone https://github.com/rbaas293/Find-Lines.git
cd Find-Lines
# Automatically transfers this module to default user modules directory.
.\toPSProfile.ps1Coming Soon.

