From owner-freebsd-questions Thu Jul 19 3:31:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from APastourelles-102-1-2-26.abo.wanadoo.fr (APastourelles-102-1-2-26.abo.wanadoo.fr [217.128.208.26]) by hub.freebsd.org (Postfix) with ESMTP id 7674737B435 for ; Thu, 19 Jul 2001 03:31:11 -0700 (PDT) (envelope-from olive@deep-ocean.net) Received: by APastourelles-102-1-2-26.abo.wanadoo.fr (Postfix, from userid 1001) id 51EFA2561E; Thu, 19 Jul 2001 12:31:10 +0200 (CEST) Date: Thu, 19 Jul 2001 12:31:10 +0200 From: Olivier Cortes To: BSD Freak Cc: freebsd-questions@freebsd.org Subject: Re: Shell scripting gurus I nedd your help Message-ID: <20010719123110.C2150@APastourelles-102-1-2-26.abo.wa> Mail-Followup-To: Olivier Cortes , BSD Freak , freebsd-questions@freebsd.org References: <3320f53329d6.3329d63320f5@mbox.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3320f53329d6.3329d63320f5@mbox.com.au>; from bsd-freak@mbox.com.au on Thu, Jul 19, 2001 at 08:55:28AM +1000 X-Operating-System: FreeBSD 4.3-RC i386 up 7:36 Organization: Deep-Ocean Network X-URL: http://www.deep-ocean.net/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----------------------------------- #!/bin/blash COMMAND='ls -la' MSGFILE="my_temp_fic_1012380293476234" ADDRFILE="admins.txt" $COMMAND > $MSGFILE 2>&1 while read ADDR do mail -s "$COMMAND" $ADDR < $MSGFILE done < $ADDRFILE ---------------------------------- not perfect but it works (i didn't test it). --- Olivier Cortes free software admin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message