From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 01:21:54 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D862C932 for ; Mon, 15 Jun 2015 01:21:54 +0000 (UTC) (envelope-from patrickhess@gmx.net) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCA3E8B for ; Mon, 15 Jun 2015 01:21:53 +0000 (UTC) (envelope-from patrickhess@gmx.net) Received: from desk8.phess.net ([95.88.11.237]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LcnRD-1ZTRMc1Axz-00k9Fo for ; Mon, 15 Jun 2015 03:21:45 +0200 From: Patrick Hess To: freebsd-questions@freebsd.org Subject: Re: Script question Date: Mon, 15 Jun 2015 03:21:43 +0200 Message-ID: <5180074.S4mo5nn1SN@desk8.phess.net> User-Agent: KMail/4.14.2 (FreeBSD/10.1-RELEASE; KDE/4.14.2; i386; ; ) In-Reply-To: <557E1EA7.3080507@gmail.com> References: <2609852.Pc7nSdcYla@desk8.phess.net> <557E1EA7.3080507@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9bnZlfThOoeaArdd2ayf9NyAtjRxoWiLl3zXDmSVcG8Tf/K41rl 3M5mXROyK/fF77N0wgGTa2x/nDqicQTpxYcQcwstpUZcYVx0RBLgv1lHcFtpSowAdnXTva0 HZUQz/M2wj8buqrRl6ZwuxGqbRuA6DkLX5xLd81mFlgn0ON0cX/UU27+joTyCfjNtecfkow fk5xGgf6N8bnYXa/2PKWA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ABBK/G5NVNs=:uu2QZO21LhknZ6urkaRkvo eUNjaJAK8HYq6uIg/NzqNRGWEy0suJkV8gcgpX1YD3zntNk1fUnTs5Yhrb6LJruGx7vxYWuHh 7344xJgRANkdrBms3W9fzUVTIaPkZON8Fuq8bIQelVX1EgtB1+juQfTpkA1Iw1MC8zxEdX83M /6CT5z6PNFIFmuX7nmunBHCSzkpD+on+iqalaw/TrlnTEbJKwg5GciqG1O85Bmu4rvSVwHRy+ /0GFX7zEtd3UJhH+W1V4CsxqY7UnJ7Hf8VvIGO1EUlQulYm5hHDeMrZxAmh02zWyDsYsPqYFl DT0lrF2CtRKRQTz/VotfrOxGYEPJUoDX74yFnpbh8MQwG/JNo47ejwn7GZ7Sd3Cgnweqq4IhF a1mXP/XfsR7bN/rNSaBFY7dPX8vBmv7gMu9qPCHAtHAhHaP3yRr44cfC78yjxRZ7FYoYKaDjD uO3QNeJuGPPlMDqziv5Y+q+9PmiGj2zSEXxK32n7n4vwLfSWsARG7Mh6GqlV6KlHBK070noZB U5ViMZTyYpqWISLdeNjBFjkTQlmYJt3XtoeABxrqiGKiDcHBqsQ3jQnyNrXSK3Vqin/G3lYjQ wBANivalKUNiTlEoDyIlDlBcQDvo/PZj1rHQYVpPFmuwxLgySaWkWDEvMJgBfo6xVpDkTN9q3 yjkAEvqfi224umquyuHzgStiMoT9H1uU2na/BFpZFVfGMI4/mZ4eJ1Qisu7AFBoONlFE= 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:21:54 -0000 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