scripting gurus :-)

Derek Broughton news at pointerstop.ca
Thu Jun 5 17:38:28 UTC 2008


Bart Silverstrim wrote:

> Thanks for the information on reading in the lines from a file!
> 
> Another item, related...
> 
> If I have two files A and B with IP addresses listed in them, is there a
> way to compare them such that the end result is a text file containing
> only the IPs unique to file B?

Sure, off the top of my head, using grep and cut to extract just the two
sets of IPs, "sort -u" to get them in order, and grep the "diff" output for
the B file additions only.
-- 
derek





More information about the ubuntu-users mailing list