From owner-freebsd-questions Wed Apr 17 19:28:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail5.nc.rr.com (fe5.southeast.rr.com [24.93.67.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C1C237B41A for ; Wed, 17 Apr 2002 19:28:47 -0700 (PDT) Received: from nc.rr.com ([66.26.64.108]) by mail5.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Wed, 17 Apr 2002 22:28:38 -0400 Message-ID: <3CBE2F51.41E19E8A@nc.rr.com> Date: Wed, 17 Apr 2002 22:28:33 -0400 From: Michael E Mercer Reply-To: mmercer@nc.rr.com X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 4.5-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Dan Nelson Cc: Taylor Dondich , questions@FreeBSD.ORG Subject: Re: More of a scripting question I guess. References: <000901c1e678$bc14fa80$6600a8c0@penguin> <20020418015926.GI72244@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 another way to do it is this with the same outcome: while read address ; do somecommand $address done < file.txt Dan Nelson wrote: > In the last episode (Apr 17), Taylor Dondich said: > > I've got a list of e-mail addresses in a text file. I'd like to > > process a command on EACH of those addresses with a program on my BSD > > box. I don't know a lick or two or shell programming (I'd think you > > can get it done with this). > > cat file.txt | while read address ; do > somecommand $address > done > > -- > Dan Nelson > dnelson@allantgroup.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message