Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140762

How do add double quotes to every line

$
0
0

I have a powershell script here: $web = New-object Net.WebClient $web | Get-Member $web.DownloadString("http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt") $input_path = 'C:\users\barteaga\documents\NewList.txt' $output_file = 'C:\users\barteaga\documents\IpList.txt' $regex = '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01][0-9][0-9]?)$' select-string -Path $input_path -Pattern $regex -AllMatches|% {$.Matches } | % { $.Value } > $output_file

What i want to do is add "":"bad" to every line which are just ip addresses and I nkow I am close but am unable to get the right syntax for it. The IPList.txt is what contains the ip addresses


Viewing all articles
Browse latest Browse all 140762

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>