[ale] Question about awk

Michael B. Trausch mbt at zest.trausch.us
Wed Sep 16 20:41:36 EDT 2009


On Wed, 2009-09-16 at 19:19 -0400, Chuck Payne wrote:
> I have tried to use sed to remove [] hoping that it would every before
> and after the [] 's, but it ugly. 

If you just want the IP, why not use this:

cat foo | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
94.71.67.117
187.78.66.100
192.168.105.11
98.224.185.217
85.72.159.136
85.72.159.136
151.202.63.204
124.122.183.185
62.68.49.34

	--- Mike

-- 
Blog:  http://mike.trausch.us/blog/
Misc. Software:  http://mike.trausch.us/software/



More information about the Ale mailing list