From owner-freebsd-questions@FreeBSD.ORG Wed Aug 24 01:02:21 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 AA88416A41F for ; Wed, 24 Aug 2005 01:02:21 +0000 (GMT) (envelope-from antennex@swbell.net) Received: from ylpvm15.prodigy.net (ylpvm15-ext.prodigy.net [207.115.57.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id F229A43D49 for ; Wed, 24 Aug 2005 01:02:20 +0000 (GMT) (envelope-from antennex@swbell.net) Received: from pimout7-ext.prodigy.net (pimout7-int.prodigy.net [207.115.4.147]) by ylpvm15.prodigy.net (8.12.10 outbound/8.12.10) with ESMTP id j7O12Qqr020563 for ; Tue, 23 Aug 2005 21:02:27 -0400 X-ORBL: [65.68.247.73] DomainKey-Signature: a=rsa-sha1; s=sbc01; d=swbell.net; c=nofws; q=dns; h=message-id:reply-to:from:to:subject:date:mime-version: content-type:content-transfer-encoding:x-priority: x-msmail-priority:x-mailer:x-mimeole; b=A4emiAfSrV6JCv4Xa7bDvDq7Z+z4PJh+K+50p6rtgyhnSrjePnVd5VZW5YT0teOOL AMVAT2UcRc6B3ucQxdrLg== Received: from SAGEAME (adsl-65-68-247-73.dsl.crchtx.swbell.net [65.68.247.73]) by pimout7-ext.prodigy.net (8.13.4 outbound domainkey aix/8.13.4) with SMTP id j7O12IqZ473558 for ; Tue, 23 Aug 2005 21:02:19 -0400 Message-ID: <040a01c5a847$7a0353f0$0200000a@SAGEAME> From: "antenneX" To: Date: Tue, 23 Aug 2005 20:02:18 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Subject: Script help using "cut" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: antenneX List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2005 01:02:21 -0000 Been trying to complete a script that I can use to grep spam emails from the maillog, then trim it to just the plain email address. Trying to use "cut" in the script but it's not doing what I want yet. Here is what the earlier lines have the lines down to so far: " (envelope-from spammer@badguy.com)" -- no quotes ...and I want this "clean" trimmed result after trim using "cut" or anything else that works to trim/cut: spammer@badguy.com <--- no underlines of course That's a TAB space at beginning of the line. The "envelope" lines are in a tmp file in colum format (one line below the other). (envelope-from spammer@badguy.com) (envelope-from spammer2@badguy2.com) (envelope-from spammer3@badguy3.com) All ideas appreciated.... Best regards, Jack L. Stone