Re: dig: single line

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

 



Mike -- EMAIL IGNORED wrote:
> How about:
> 
>    grep "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]"
> 
> ?
> Can it be done more concisely?  Still, one of
> the numbers might exceed 255 ... unlikely.

Just keep it simple ;), and use
(http://www.regular-expressions.info/examples.html):

perl -e "print
grep(/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,<>);"

All one line, of course.

Matt Flaschen

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux