Re: Command grep -

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

 



On 12.04.2013 21:24, Bob Goodwin - Zuni, Virginia, USA wrote:

> It's not clear to me what that should do but it produces a long list,
> not in the form I need? I just want to filter [view] DST=17.*.
> 
> 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


[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


-- 
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