From owner-freebsd-questions Tue Dec 24 19:31:16 2002 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 390CB37B401 for ; Tue, 24 Dec 2002 19:31:15 -0800 (PST) Received: from pooh.ASARian.org (rdu26-76-083.nc.rr.com [66.26.76.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECBA743EA9 for ; Tue, 24 Dec 2002 19:31:08 -0800 (PST) (envelope-from fuzzy@pooh.ASARian.org) Received: from localhost (fuzzy@localhost.ASARian.org [127.0.0.1]) by pooh.ASARian.org (8.12.6/8.12.6) with ESMTP id gBP3VMWk013881; Tue, 24 Dec 2002 22:31:24 -0500 (EST) (envelope-from fuzzy@pooh.ASARian.org) Date: Tue, 24 Dec 2002 22:31:22 -0500 (EST) From: Fuzzy To: Kurt Bigler Cc: questions@FreeBSD.ORG Subject: Re: Argument list too long: limitation in grep? bash? FreeBSD? In-Reply-To: Message-ID: X-No-Archive: Yes Organization: ASARian Inc. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Tue, 24 Dec 2002, Kurt Bigler wrote: > The success of the second item maybe gives a clue how to approach the first. > Maybe try something like this: > > ls | grep .html > temp > > edit temp to insert "grep " at the beginning of each line > e.g. in vi use > :%s/^/grep __FILE__ / > > Now temp contains bunch of lines like: > > grep __FILE__ file1.html > grep __FILE__ file2.html > grep __FILE__ file3.html > > Then chmod +x temp and execute it or use temp as input to your desired > shell. > > ls | grep .html > temp > > edit temp to insert "grep " at the beginning of each line > e.g. in vi use > :%s/^/grep __FILE__ / > ls | grep .html | sed 's/^/grep __FILE__/g' > temp maybe? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message