From owner-freebsd-questions@FreeBSD.ORG Thu Oct 21 14:57:28 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 3C3A716A4CE for ; Thu, 21 Oct 2004 14:57:28 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id D717943D1D for ; Thu, 21 Oct 2004 14:57:27 +0000 (GMT) (envelope-from nocmonkey@gmail.com) Received: by rproxy.gmail.com with SMTP id 73so34754rnk for ; Thu, 21 Oct 2004 07:57:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=faHfjzw0wJD2dZVepSShNhg/wOfwpWSlJj/9/fF/JPJQ2o2j9KZXPau4XIK2JBhCIf8yHVfDUQOoR0lMf9ZmdMTMCjQGA8UshBRrW0uCCcxKWR3KKy0yBBG26aEazS38PF8NK+2WUi2T32Aj1Z3l271jJYSelqmCu/MaYzEs4FE= Received: by 10.38.152.39 with SMTP id z39mr3136541rnd; Thu, 21 Oct 2004 07:57:27 -0700 (PDT) Received: by 10.38.22.79 with HTTP; Thu, 21 Oct 2004 07:57:27 -0700 (PDT) Message-ID: Date: Thu, 21 Oct 2004 10:57:27 -0400 From: Danny To: FreeBSD-questions Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: OT: date command for pflogsumm.pl Script - undefined variable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Danny List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 14:57:28 -0000 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