From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 01:41:27 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B664EC01 for ; Mon, 15 Jun 2015 01:41:27 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D691302 for ; Mon, 15 Jun 2015 01:41:27 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: by iecrd14 with SMTP id rd14so21989208iec.3 for ; Sun, 14 Jun 2015 18:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5fE88o+l2mxGLaQr/c/ExeGeRWTvivv3yG1Hmr/xqWw=; b=FxEdJfZtUUe7X/i4SZ130aAa6Fkwa54N6nDpLn8VbqBi+aCpZCHQzJlQ6aFb/XxIap 9Z/ERSZhPKgy+LUe4QcRJvQoLArZgLNdOBTLJzpXdX5qpHFwjI2brf7n40t0KLUimaAM ISguDYJsumSGhWlNKMdB0eI3a07LrVHHwJ+SYW75BI2Q0/QKkIpDhnbZOEp0/Zc1O0dl e/0Ay7JBjHAMzc0E2jx4GPyDzoZJPYh5FDV3ct5eUD8sqejDzdjqiT6DbtMgvGqF8ZED krouKrpa3sVg+OmD/8wd/jsv5zCiiwcmmT9ouS9+nZjtVKVIPk7Ax0dqvNVG08CJMLoN /u5w== X-Received: by 10.50.20.200 with SMTP id p8mr17638525ige.28.1434332486965; Sun, 14 Jun 2015 18:41:26 -0700 (PDT) Received: from localhost.localdomain ([50.243.6.59]) by mx.google.com with ESMTPSA id j192sm7840708ioe.27.2015.06.14.18.41.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jun 2015 18:41:26 -0700 (PDT) Message-ID: <557E2D2F.1090101@gmail.com> Date: Sun, 14 Jun 2015 19:41:03 -0600 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Script question References: <2609852.Pc7nSdcYla@desk8.phess.net> <557E1EA7.3080507@gmail.com> <5180074.S4mo5nn1SN@desk8.phess.net> In-Reply-To: <5180074.S4mo5nn1SN@desk8.phess.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 01:41:27 -0000 On 06/14/2015 07:21 PM, Patrick Hess wrote: > jd1008 wrote: >> On 06/14/2015 06:27 PM, Patrick Hess wrote: >>> awk '/spam=YES/ {print $11}' /var/log/maillog | >>> sort | >>> uniq | >>> sed -e 's/^.*=//' | >>> tee -a /usr/samba/mail/envelope | >>> mail -s "SPAM IPs...." us.navy@outlook.com >> Patrik, you forgot to add the continuation \ >> at end of you lines. > No, I didn't. Just try it. /bin/sh most definitely does not require > a \ if the line ends with a | (or &&, ||, etc. for that matter). > > Patrick Right - I had forgotten that :)