I have the code below which produces the example below, ideally I would like to amend the output to produce a SQL command, as per the desired output.
Is this possible?
$olddata = "d:\SCRIPTS\Storage\testing\unix-email.txt" $destination_file = 'd:\SCRIPTS\Storage\testing\servergraph-output.txt' (Get-Content -Raw $olddata) -split "`n" | foreach { if($_ -match ‘c0t(.+?) <’) { $matches.1 } } | Set-Content $destination_file
Output Example
60002AC000000000000003F90001E726d0
60002AC000000000000003FC0001E726d0
60002AC000000000000003FD0001E726d0
60002AC000000000000003FE0001E726d0
60002AC000000000000005B70001E726d0
60002AC000000000000005B80001E726d0
Desired Output
and wwn like ‘%60002AC000000000000003F90001E726d0%’
or wwn like ‘%60002AC000000000000003FC0001E726d0%’
or wwn like ‘%60002AC000000000000003FD0001E726d0%’
or wwn like ‘%60002AC000000000000003FE0001E726d0%’
or wwn like ‘%60002AC000000000000005B70001E726d0%’