I need to do the following:
Take a list of various strings, one of which is a quoted IP address, and
extract the IPs. (Done that.)
Then take the list of IPs and convert them to a list of IPs with masks on a
IOW, I have converted the original list to this:
Now I need to remove the newlines and add /32, to the end of each IP so that I
I got close with sed, but I'm not quite there.
I got this:
Here's the code I used:
cat hostlist | cut -d',' -f2 | cut -d'"' -f2 | sort | uniq | grep -v "inet" |
sed '/[^*]$/N;s/\n */\/32,/'
What am I missing?
Paul Schmehl ([EMAIL PROTECTED])
Senior Information Security Analyst
The University of Texas at Dallas
email@example.com mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"