Groovy web console

subscribe to the feed Subscribe
to this
site
List of IPs to string of IPs (via #groovywebconsole)
tweet this snippet Tweet
this
script

List of IPs to string of IPs

Published 1 month ago by Martin Smith with tags IP
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def ips = []
def str = """
 54.154.218.204
 54.154.44.113
 54.229.140.194
 54.194.194.174
 54.171.96.208
 54.154.15.55
""".eachLine { ips << it }
   .findAll{ it }
   .join(",")

println str.replaceAll(", ", ",")