From owner-freebsd-questions@FreeBSD.ORG Wed Apr 22 20:07:23 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57BC01065678 for ; Wed, 22 Apr 2009 20:07:23 +0000 (UTC) (envelope-from evuraan@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.226]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAF38FC3D for ; Wed, 22 Apr 2009 20:07:23 +0000 (UTC) (envelope-from evuraan@gmail.com) Received: by rv-out-0506.google.com with SMTP id k40so133678rvb.43 for ; Wed, 22 Apr 2009 13:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=Bak++9JSjxPfj7kcLsctVzuge0SrOgpIYSTGCdx7CCo=; b=u6QQih4d4I4SDKLSB4sRPoXblavBo0xC4m7sKNmzhMMRW80Z0CR8zSuHPp4TkQjuoh WTev6DqN6Rwjm4MrWwdRaxUiAHI+NthPVvJvFC9T3Of55MVlBVRMFob76/29HdbxfnoP 1cn99gQ25Qld/zbTqziVy3PbWMFxwDd9UN+T4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=j82DZ9rtppYG1XHFZch85RbgUd5xryytiIgEvi8AgYgf9yJYQxWtQLdlBb5ISZTDcy CSyblXOntkrwgQEpp7Gprc1p9wQNshEt9cu7a1E5qXSmhJu+jTKDD9nj8SzuAa9q/+v8 gbrdNhi4W/uzf6YfbfREvLUeM3qz1GvNLXjDw= MIME-Version: 1.0 Received: by 10.141.201.1 with SMTP id d1mr33685rvq.182.1240429127711; Wed, 22 Apr 2009 12:38:47 -0700 (PDT) Date: Wed, 22 Apr 2009 12:38:47 -0700 Message-ID: <6fbcd0710904221238r1cb63d41qaa331beb683ffa95@mail.gmail.com> From: =?UTF-8?B?RXZ1cmFhbjo64LSP4LS14LWC4LSw4LS+4LSo4LWN4oCNIA==?= To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: awk question (actively tail a file & notify when expression is found) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 20:07:23 -0000 Greetings..! this works, tail -f /var/log/apache2/access.log | nawk '/192.168.1.100/{ print $0 }' and this too: tail -f /var/log/apache2/access.log |awk ' /192.168.1.100/ { system ("mail -s \"This works\" me@email.address")}' but this below, does not work tail -f /var/log/apache2/access.log |awk ' /192.168.1.100/ { print $0 | "mail me@email.address "}' Any pointers would be much appreciated. Thx.