Date: Mon, 29 Jul 2002 17:34:22 -0400 (EDT) From: "Christopher J. Umina" <uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> To: Fernando Gleiser <fgleiser@cactus.fi.uba.ar> Cc: FreeBSD Question Mailing List <questions@FreeBSD.ORG> Subject: Re: matching a string Message-ID: <20020729173344.X19550-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> In-Reply-To: <20020729182126.S96433-100000@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
That worked.. I'll use it when I do stuff on the web about this log, but I'd still like to know how to do it using sed or awk. Thanks a lot though, Christopher J. Umina On Mon, 29 Jul 2002, Fernando Gleiser wrote: > On Mon, 29 Jul 2002, Christopher J. Umina wrote: > > > Hello, > > > > I'm writing some code to pull screen names out of a log, but I > > can't seem to figure out the regular expressions to get it done. If you > > want to see the log file it's at: > > http://216.164.225.145:81/~uminac/mp3/logs/master > > What I've been looking to make the script do is just list the > > screen names without the brackets, that's all. For instance: > > > Try this: > > perl -e 'while (<>) {if ($_=~/\[(.+)\]/) {print $1, "\n" }}' < file > > Here's the perl script in a more readable form: > > > #!/usr/bin/perl -w > > while (<>) { > if ($_=~/\[(.+)\]/) { > print $1, "\n"; > } > } > > Fer > > > > > > > kelzy16 > > cc skillet > > ccgirl436 > > ccgirl436 > > meikman99 > > bctictac8 > > > > If anybody can help me out in this I'd appreciate it. > > > > Thank you, > > Christopher J. Umina > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020729173344.X19550-100000>