|
Posted by Jim Gibson on June 5, 2008, 11:59 am
Please log in for more thread options
> ba9790cf376f@r66g2000hsg.googlegroups.com:
>
> >> Ray Muforosky wrote:
> >> > Hello
> >>
> >> > I need to match on lines where the 4 quadrant of the ip is even with
> >> > one line regex.
> >>
> >> [snip]
> >>
> >> What do you have so far? There are plenty of pages outlinging regexps
> >> for matching IP addresses... that should prove a good start for you
> >
> > egrep '^[0-9]\.[0-9]\.[0-9]\.([stock here])\s*'
> > filename
>
> What is egrep?
egrep is a version of the Unix grep program that does regular
expressions.
$ man egrep
"GREP(1)
NAME
grep, egrep, fgrep - print lines matching a pattern
SYNOPSIS
grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]
DESCRIPTION
Grep searches the named input FILEs (or standard input if no files are
named, or the file name - is given) for lines containing a match to the
given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. Egrep
is the same as grep -E. Fgrep is the same as grep -F."
So the OP is asking a question about a Unix utility in a Perl group.
--
Jim Gibson
|