From owner-freebsd-questions@FreeBSD.ORG Sat May 30 18:40:39 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E0281065674 for ; Sat, 30 May 2009 18:40:39 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 36D5D8FC1E for ; Sat, 30 May 2009 18:40:37 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n4UIeMII019646; Sat, 30 May 2009 20:40:22 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n4UIeLfS019643; Sat, 30 May 2009 20:40:22 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 30 May 2009 20:40:21 +0200 (CEST) From: Wojciech Puchar To: Walt Pawley In-Reply-To: Message-ID: References: <20090530183239.a6755d97.freebsd@edvax.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Polytropon , Zbigniew Szalbot , freebsd-questions@freebsd.org Subject: Re: find and searching for specific expression in files 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, 30 May 2009 18:40:39 -0000 > | while read x; do "$x"; done > > which should get around the list length limitations and > provides for doing "extras" between the "do" and the "done". > Specifically: > > find /path/to/files/ -mtime -2 -print | \ > while read x; do grep "expression" "$x"; done same as -exec works but forks a process for each single file - slow -exec and + or xargs do the job