From owner-freebsd-questions Mon Jul 29 14:21:33 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BE1937B405 for ; Mon, 29 Jul 2002 14:21:25 -0700 (PDT) Received: from 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com [216.164.225.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4406F43E3B for ; Mon, 29 Jul 2002 14:21:24 -0700 (PDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Received: from localhost (uminac@localhost) by 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (8.11.6/8.11.6) with ESMTP id g6TLM2h01342; Mon, 29 Jul 2002 17:22:02 -0400 (EDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Date: Mon, 29 Jul 2002 17:22:02 -0400 (EDT) From: "Christopher J. Umina" To: Oliver Humpage Cc: Philip Hallstrom , FreeBSD Question Mailing List Subject: Re: matching a string In-Reply-To: <20020729220456.L50458-100000@mail.watershed.co.uk> Message-ID: <20020729172106.G1289-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG when I run that this is my output even when I add the .+: Sun Jul 07, 2002 at 17:10:03; [kelzy16 Mon Jul 08, 2002 at 17:17:12; [cc skillet Wed Jul 10, 2002 at 17:53:41; [ccgirl436 Wed Jul 10, 2002 at 17:53:41; [ccgirl436 Thu Jul 11, 2002 at 16:58:31; [meikman99 Mon Jul 15, 2002 at 17:43:50; [bctictac8 Thu Jul 18, 2002 at 22:07:46; [superman lmd 69 Thu Jul 18, 2002 at 23:22:15; [russh2112 Thu Jul 18, 2002 at 23:22:27; [russh2112 Fri Jul 19, 2002 at 15:37:14; [lauren md 6 9 Fri Jul 19, 2002 at 16:36:06; [alldayyesterday Fri Jul 19, 2002 at 16:47:38; [fritzilldo Fri Jul 19, 2002 at 16:47:40; [beth42085 Sun Jul 21, 2002 at 19:17:59; [mastahuy85 Mon Jul 22, 2002 at 08:47:52; [dublindamien Mon Jul 22, 2002 at 10:23:17; [adarc22 Mon Jul 22, 2002 at 10:23:28; [adarc22 Mon Jul 22, 2002 at 10:23:56; [adarc22 Mon Jul 22, 2002 at 23:42:21; [katsie236 Tue Jul 23, 2002 at 22:19:23; [e is happy Wed Jul 24, 2002 at 19:04:14; [ilaughatyourlife Thu Jul 25, 2002 at 08:58:54; [adarc22 Fri Jul 26, 2002 at 14:40:06; [devilchik205 Fri Jul 26, 2002 at 15:43:55; [alldayyesterday Fri Jul 26, 2002 at 22:18:51; [reggie645 Fri Jul 26, 2002 at 22:36:57; [reggie645 Fri Jul 26, 2002 at 23:29:28; [sllissa85 Fri Jul 26, 2002 at 23:37:35; [jea9f2oo3 Fri Jul 26, 2002 at 23:49:17; [reggie645 Fri Jul 26, 2002 at 23:50:21; [reggie645 Fri Jul 26, 2002 at 23:51:29; [reggie645 Fri Jul 26, 2002 at 23:51:56; [reggie645 Fri Jul 26, 2002 at 23:54:01; [reggie645 Sat Jul 27, 2002 at 17:04:16; [meikman99 Sun Jul 28, 2002 at 10:08:09; [bctictac8 Sun Jul 28, 2002 at 10:39:36; [e is happy Sun Jul 28, 2002 at 23:15:38; [babygurl2835 Sun Jul 28, 2002 at 23:17:05; [babygurl2835 On Mon, 29 Jul 2002, Oliver Humpage wrote: > > On Mon, 29 Jul 2002, Philip Hallstrom wrote: > > > Something like... > > > > sed -e 's/^; \[//' -e 's/].*//' logfile > > > > should work... I'm sure there are lots of other ways to do it as well. > > Wouldn't you need to make the first bit: > > 's/^.+; \[//' > ^^ > ? > > Apart from that, thanks for a demonstration of sed's -e flag, I didn't > realise it did that :) > > Oliver. > > (PS This won't get posted to the list, since reverse IP lookup ain't > working...) > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message