From owner-freebsd-questions@FreeBSD.ORG Thu Oct 21 15:22:17 2004 Return-Path: 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 3103616A4CE for ; Thu, 21 Oct 2004 15:22:17 +0000 (GMT) Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id D889743D45 for ; Thu, 21 Oct 2004 15:22:16 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [69.27.131.0] ([69.27.131.0]) by ns1.tiadon.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 21 Oct 2004 10:22:14 -0500 Message-ID: <4177D424.3040702@daleco.biz> Date: Thu, 21 Oct 2004 10:22:12 -0500 From: "Kevin D. Kinsey, DaleCo, S.P." User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040712 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Danny References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Oct 2004 15:22:14.0898 (UTC) FILETIME=[BE8FDD20:01C4B781] cc: FreeBSD-questions Subject: Re: OT: date command for pflogsumm.pl Script - undefined variable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 15:22:17 -0000 Danny wrote: >I am trying to get this script to run: > ># >day=`/bin/date "+%m-%d-%Y"` ># >/usr/sbin/pflogsumm.pl -i -mailq --smtpd_stats --problems_first >--iso_date_time -d yesterday /home/user/maillog > >/var/log/MX1-PostfixDailyReport.${day} ># >gzip -c /var/log/MX1-PostfixDailyReport.${day} | uuencode >MX1-PostfixDailyReport.${day}.gz | mail -s "`hostname` Daily Mail >Report for `LC_CTIME=C date +\"%A, %d %B %Y\"`" root # gzip >/var/log/GW1-PostfixDailyReport.${day} ># > >and I know very little about programming (I am working on this), and I >receive the following error: > >mx1# ./pflogsumm.test >day=10-21-2004: Command not found. >day: Undefined variable. >day: Undefined variable. > >Any suggestions? I just want this script to run and email me the >output of pflogsumm.pl for my maillogs. > >Thank you! > >...D > Which shell are you using? Kevin Kinsey