![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Commad equal to Grep Hi can someone let me know how I can grep or get-content a file, and show how many line we have an entry with the same string? Thanks |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Commad equal to Grep Select-String -Path <File> -Pattern <SomePattern> If you want a count either... (Select-String -Path <File> -Pattern <SomePattern>).Count Or: Select-String -Path <File> -Pattern <SomePattern> | Measure-Object Note that the Pattern parameter is a regular expression unless you also specify SimpleMatch. HTH Chris atorres wrote: Quote: > Hi can someone let me know how I can grep or get-content a file, and show how > many line we have an entry with the same string? > > Thanks > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Find and GREP | PowerShell | |||
| grep -r equiv | PowerShell | |||
| Grep | Vista file management | |||
| select-string to act like grep -v | PowerShell | |||
| Re: grep, which, and tail commands? | PowerShell | |||