Re: Command grep -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/04/13 16:13, poma wrote:
less syslog.txt | grep "DST=17\." does that and solves my immediate need.
A long list - a two IP addresses!? :)
Well, if you don't need this *short* IP addresses output .i.e. for a
'whois'[1] so you can parse the required IP range i.e. for a net filter,
nonetheless can serve as a textbook example of how to use awk and other
tools mentioned - for a general public. ;)
Have a nice weekend!

poma

I am filtering "syslog.txt" which has about a thousand lines of data for DST=17.* And yes I use whois to identify the numeric address'.

[1]
whois 17.171.4.13 | grep "CIDR\|NetRange"
NetRange:       17.0.0.0 - 17.255.255.255
CIDR:           17.0.0.0/8

whois 174.35.3.56 | grep "CIDR\|NetRange"
NetRange:       174.35.0.0 - 174.35.127.255
CIDR:           174.35.0.0/17

That helps though, e.g.:

[bobg@box10 Downloads]$ whois 199.47.216.179  | grep "CIDR\|NetRange"
NetRange:       199.47.216.0 - 199.47.219.255
CIDR:           199.47.216.0/22

Dropbox.com, another address of interest. She stores image files there.

Bob

--

http://www.qrz.com/db/W2BOD

box10   Fedora-18 XFCE Linux

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux