From owner-freebsd-questions@FreeBSD.ORG Sat Aug 13 03:19:26 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 9272716A41F for ; Sat, 13 Aug 2005 03:19:26 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6005943D48 for ; Sat, 13 Aug 2005 03:19:22 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 18350 invoked by uid 207); 13 Aug 2005 03:19:20 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.188):. Processed in 0.425367 secs); 13 Aug 2005 03:19:20 -0000 Received: from dialup188.ach.sch.gr (HELO gothmog.gr) ([81.186.70.188]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 13 Aug 2005 03:19:19 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j7D3JGm4002102; Sat, 13 Aug 2005 06:19:16 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j7D3JDVH002101; Sat, 13 Aug 2005 06:19:13 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 13 Aug 2005 06:19:12 +0300 From: Giorgos Keramidas To: Benson Wong Message-ID: <20050813031912.GB1938@gothmog.gr> References: <20050812013604.8C12D16A422@hub.freebsd.org> <860807bf050812133839dd8f46@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <860807bf050812133839dd8f46@mail.gmail.com> Cc: Xu Qiang , Ian Smith , freebsd-questions@freebsd.org Subject: Re: Help on bash script? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2005 03:19:26 -0000 On 2005-08-12 13:38, Benson Wong wrote: > I prefer: > > for COREFILE in `find / -type f -name core -print` > do > ... > done > > Wouldn't that accomplish the same thing? More or less. Less, when the filenames are too many. See questions posted on this very same list about ``too many arguments''. The ``while read line; do stuff with $line; done'' loop doesn't suffer from the same limitation, but is a bit more expensive in terms of the number of spawned processes and (consequently) the time it takes to run.