From owner-freebsd-questions Thu Mar 7 13: 8:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from post-20.mail.nl.demon.net (post-20.mail.nl.demon.net [194.159.73.1]) by hub.freebsd.org (Postfix) with ESMTP id A888C37B426 for ; Thu, 7 Mar 2002 13:08:23 -0800 (PST) Received: from [212.238.194.207] (helo=mailhost.raggedclown.net) by post-20.mail.nl.demon.net with esmtp (Exim 3.35 #2) id 16j57e-000L1x-00 for freebsd-questions@freebsd.org; Thu, 07 Mar 2002 21:08:22 +0000 Received: from angel.raggedclown.net (angel.raggedclown.intra [192.168.1.7]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [buffy]) with ESMTP id 9565413040 for ; Thu, 7 Mar 2002 22:08:21 +0100 (CET) Received: by angel.raggedclown.net (Ragged Clown Host [angel], from userid 1005) id 7449822598; Thu, 7 Mar 2002 22:08:21 +0100 (CET) Date: Thu, 7 Mar 2002 22:08:21 +0100 From: Cliff Sarginson To: "'freebsd-questions@freebsd.org'" Subject: Re: Quick text processing question Message-ID: <20020307210821.GC484@raggedclown.net> References: <5A617D4D38B5D51192AA0060081849455DD82D@501sumail1.vdot.state.va.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A617D4D38B5D51192AA0060081849455DD82D@501sumail1.vdot.state.va.us> User-Agent: Mutt/1.3.27i 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 On Thu, Mar 07, 2002 at 02:54:59PM -0500, Pieckiel, Kevin A wrote: > I don't know sed, awk, or Perl. But I know one (or more) of these-- > and probably several other tools--can do what I need. > > Please help me contruct a command line that will take a single > line of text and extract an E-Mail address from it. For example: > > freebsd-questions@freebsd.org > "Kevin A. Pieckiel" > From: An Internet User > > When each line is run thru the command line for which I ask, > I should get: > > freebsd-questions@freebsd.org > kevin.pieckiel@virigniadot.org > user@inter.net > > Your help is appreciated. > I think the best help is to say .. "now is a good time to learn one of these tools". Of the three, sed is probably the simplest to start with. -- Regards Cliff Sarginson -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message