From owner-freebsd-questions@freebsd.org Mon Apr 3 21:41:21 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AB33D2CF70 for ; Mon, 3 Apr 2017 21:41:21 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (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 063C7210 for ; Mon, 3 Apr 2017 21:41:21 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-it0-x234.google.com with SMTP id y18so54773497itc.0 for ; Mon, 03 Apr 2017 14:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject :content-transfer-encoding; bh=/uCHE9kWzdp08K7DfFo2L/mDs5KJKEvsFpT26gjwW8A=; b=QCNFI7XAAH0k2rXkn0wn7zD7lzj3CKsPDdEpXpUQlT0JQhF3MGji3OUGZiBvoakZfm gl3/zZqSIFiTxM+6Ger5E4LxU9LXHw1ZOQHrWlMBi8+XLxXVTh0kXkyswaQ234iHPzsk qe4vwhYvzVGKUU3c+HQ7Z5E8yPmI5xyZGCdSMeFPd7T5N1uJks1e28tq5BCOL/KxEZnG TbRKrGV7iNn+x0RM+0InzVWG5wn9EoGKwFh7gUv6XTqnEhHPehhe5c8fIDmNwgsJ2VAt gS3a+EHKSZpEfqa4iB3PeOiYCNmnh6WXJu8Eb7DcO9Tdxga2GI0C0nG1wgWE/DJNki9o 8hjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-transfer-encoding; bh=/uCHE9kWzdp08K7DfFo2L/mDs5KJKEvsFpT26gjwW8A=; b=WC3ZdnVLfKuZpcjLcH871cEwLmnwSbQyCITqjaS1PPElTOKf6cPd25piIGJtCAHCob Tu7pgId2UTIK3GDuMqpZ09kbtWaTycBs1nsBfkmpLdCx+npotg5/fCpThMaocds01CIm uJMyBDSd3Y9Av1SiEWzS6Okqq7pvtHfSmNdY2c4Q7U2T/ZcGzCoxDIrug75JwUBRS1TM r+KQ+oDvTxBPlz4Q0gaxeZPMc0Ly4VA8bTFWLjMsH6QCIMT7w3IXHteh+Nyt528TP6OM sa8risCAV0tvE/r7PkOLQDw/NZxlUQFp1KnPKSl55+haxSW6E+eER1kJNiN/uFayOn82 gbhQ== X-Gm-Message-State: AFeK/H2W0oG1h6B1vcCXPfjU5LVhFRis1elJQBniogKW3Gw9G1LM5C0b3D6qNQ9ksnuhzw== X-Received: by 10.36.153.134 with SMTP id a128mr12765404ite.90.1491255680242; Mon, 03 Apr 2017 14:41:20 -0700 (PDT) Received: from [10.0.10.3] (cpe-74-141-88-57.neo.res.rr.com. [74.141.88.57]) by smtp.googlemail.com with ESMTPSA id g103sm8174784iod.44.2017.04.03.14.41.19 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 14:41:19 -0700 (PDT) Message-ID: <58E2C19A.40306@gmail.com> Date: Mon, 03 Apr 2017 17:41:46 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: FreeBSD questions Subject: pipe syslog records to a script Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2017 21:41:21 -0000 Hello list; In syslog.conf I have these 2 lines. local0.* /var/log/security local0.* | exec /usr/local/bin/ipf.table The security log file is being populated and working fine. Now I want to pipe the same log records to a script for processing. The ipf.table script looks like this #! /bin/sh $1 >> /var/log/ipf.table.log1 $@ >> /var/log/ipf.table.log2 $* >> /var/log/ipf.table.log3 service syslogd restart The ipf.table.log1, 2, 3 never get populated even though I see new entries in the security.log file. What am I doing wrong here? Thanks for your help.