On Dec 27, 2004, at 3:08 PM, Christopher J Bidwell wrote:

Is there a way that I can grep out a specific IP range out of an NBE file?

grep '192\.168\.0\.[3-25]' old.nbe > new.nbe

I thought this would have worked but it doesn't give me the results I'm
looking for.

You're giving it a regular expression and those semantics are hard to represent with regular expressions. You could try this awk recipe:


gawk -F '[|]' '$1 != "results" { print $0; } $1 == "results" { split($3, quads, "[.]"); if (quads[4] >= 3 && quads[4] <= 25) print $0; }' old.nbe > new.nbe

It's a messy one-liner, but can be made prettier with newlines & indentation if this is going into a script.


Best regards, Erik Stephens www.edgeos.com Managed Vulnerability Assessment Services

_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus

Reply via email to