Tuesday, October 25, 2011

powershell parsing data mms

set-Executionpolicy unrestricted
# above allows it to run
$readthefile = (Get-Content C:\Users\NigelDude\Documents\channels.txt)
#$readthefiletwo = ((Get-Content c:\nigel2.txt))
write customers that exist in both > c:\out.txt

#read each line of file 1 nigel
# outer loop

foreach ($i in $readthefile)
{
#write-host TheData
#write-host $i
# inner loop
#write-host "I = " $i
#$mystring = $i
#$mystring -match 'mms'
#$matches[1]
$mystring = $i.Split()
$mystring -match 'mms'



$matches[1]
}

0 Comments:

Post a Comment

<< Home