From owner-freebsd-questions Wed Jul 18 15:57: 7 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.mbox.com.au (smtp2.mbox.com.au [203.103.80.178]) by hub.freebsd.org (Postfix) with ESMTP id D4F7337B401 for ; Wed, 18 Jul 2001 15:57:03 -0700 (PDT) (envelope-from bsd-freak@mbox.com.au) Received: from nms2.mbox.com.au (webmail.i7mail.com.au [192.168.20.4]) by smtp2.mbox.com.au (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6) with ESMTP id <0GGO00J6LYCGNA@smtp2.mbox.com.au> for freebsd-questions@FreeBSD.ORG; Thu, 19 Jul 2001 06:55:29 +0800 (WST) Received: from mbox.com.au ([127.0.0.1]) by nms2.mbox.com.au (Netscape Messaging Server 4.15) with ESMTP id GGOYCG03.01F for ; Thu, 19 Jul 2001 06:55:28 +0800 Date: Thu, 19 Jul 2001 08:55:28 +1000 From: BSD Freak Subject: Shell scripting gurus I nedd your help To: FreeBSD Questions Message-id: <3320f53329d6.3329d63320f5@mbox.com.au> MIME-version: 1.0 X-Mailer: Netscape Webmail Content-type: text/plain; charset=us-ascii Content-language: en Content-disposition: inline Content-transfer-encoding: 7BIT X-Accept-Language: en 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 Here's one for the shell scripting gurus: I have a file (admins.txt) with list of the e-mail addresses of my systems administrators (on per line) eg. john@ourcompnay.com fred@ourcompany.com betty@ourcompany.com ... ...etc I need to be able to e-mail them all the same message from the command line or a shell script (with only one command) For example I might need to email them the output of an "ls -al". I could: ls -al | mail -s "Ouput of ls command" john@ourcompnay.com ls -al | mail -s "Ouput of ls command" fred@ourcompnay.com ls -al | mail -s "Ouput of ls command" betty@ourcompnay.com ... .etc.. how can I do this with only one command taking each persons e-mail address from the file admins.txt Thanks in advance... --------------------------------------------- Receive faxes 24x7, no second line necessary. http://www.mbox.com.au/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message