|
| |||||||||
| Tags: full, line, poweshell, script, select, sting |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How get full line of text from select-string
I want to ask that how can i select full line of text form select string. Here is an explanation of what I was doing. From Select String command how can i get a full line text of a MatchInfo object. I was successful to some extent but the whole line is condensed and all the text are sticked to each line. Some lines are very long. So how do I get a select object line to get an entire line of text. Other than this what are the more select strings commands available that I can use. Can anyone tell something more about powershell. |
|
#2
| ||||
| ||||
| Re: How get full line of text from select-string
To some extent your are right. But there will be some changes in the string command. This will give you the exact result of what you want. Look at the suggestion below and edit your command as per it. This will surely work for you. Code: Instead of Select-Object pipe the MatchInfo to ForEach-Object :
select-string ... | % {$_.line} |
|
#3
| ||||
| ||||
| Re: How get full line of text from select-string
The Select-string command identifies patterns in strings. To get more information on windows powerShell then give following command - Code: get-help about_regular_expression |
|
#4
| ||||
| ||||
| Re: How get full line of text from select-string
Through Select-Script you can perform a multiple functions. I am listing some of them below. In Windows Power shell command line you can add some of them and get an overview of select string command. Syntax:
Code: Select-String [-pattern] string[]
Code: Select-String [-pattern] string[] [-text string]
Code: Select-String [-caseSensitive] |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How get full line of text from select-string" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to disable full row select in Explorer | roumieh2000 | Operating Systems | 3 | 05-12-2009 08:52 AM |
| How to let Java read text file line by line. | Visala28 | Software Development | 3 | 05-08-2009 12:30 AM |
| Windows PowerShell Select-String | HP_Crook | Software Development | 3 | 02-06-2009 11:51 AM |
| How to Delete last Characters from Text String | Harshini | Software Development | 2 | 06-05-2009 04:24 PM |
| Reading text string from text file (PHP) | Moderate | Software Development | 3 | 16-01-2009 03:27 PM |