Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to get unique line containing keywords from a notepad file

$
0
0

2476        191.196.140.42        AUTH         Di7540h     NE571 

2476        191.196.140.42        AUTH        An16         8907E5 

2600        200.143.41.214        AUTH         fgJ7n8      mboip09 

3456        77.85.120.26            AUTH         701Bvc1    Nm09876 

3456         77.85.120.26            AUTH          8hbfP49    Bv94dl 

2600         200.143.41.214        AUTH         5g8hcq1    o0nzqrv

 

Hi, I have a text file containing entries as above where my only concern are IP Addresses and the remaining data is not important. Is there any power shell script to get file with lines like below 

 

 

2476    191.196.140.42       AUTH       Di7540h     NE571 

3456     77.85.120.26          AUTH       701Bvc1     Nm09876  

2600     200.143.41.214      AUTH       5g8hcq1     o0nzqrv

 

 

or even this would work 

 

91.196.140.42

77.85.120.26

200.143.41.214 

 

 

 Thanks

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles