Looking for a regular expression
beesond001 at hawaii.rr.com
beesond001 at hawaii.rr.com
Wed Jul 25 01:09:02 PDT 2001
Dusty,
Thanks very much, I'll try that one later this week when I try my hand a
scripts again.
Ben
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 7/24/01, 1:40:37 PM, Dusty <dusty at sandust.com> wrote regarding [luau]
RE: Looking for a regular expression:
> A buddy of mine just sent me this little Perl line to print out your IP
addresses. It does checking and everything. Hank loves his perl.
> perl -n -e
"/(^|\D)([01]?\d?\d|2[0-4]\d|25[0-5])\.([01]?\d?\d|2[0-4]\d|25[0-5])\.([01
]?\d?\d|2[0-4]\d|25[0-5])\.([01]?\d?\d|2[0-4]\d|25[0-5])(\D|$)/g && print
\"$2.$3.$4.$5\n\";" /var/log/messages
> It will run through the file specified, and print each IP address it finds to
STDOUT. You can redirect the output with > >> and | like normal. Note that it
will only print the IP, not the whole line.
> Dusty
> ---
> You are currently subscribed to luau as: beesond001 at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freesoftwarehawaii.org/pipermail/luau-freesoftwarehawaii.org/attachments/20010725/469934cc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/rtf
Size: 5979 bytes
Desc: filename="text1.rtf"
URL: <http://lists.freesoftwarehawaii.org/pipermail/luau-freesoftwarehawaii.org/attachments/20010725/469934cc/attachment-0001.rtf>
More information about the LUAU
mailing list