From owner-freebsd-questions Thu Dec 26 12:47: 8 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 0A59637B401 for ; Thu, 26 Dec 2002 12:47:07 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD8C443EE1 for ; Thu, 26 Dec 2002 12:47:01 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.honeypot.net (pooh.honeypot.net [10.0.1.2]) by kanga.honeypot.net (8.12.6/8.12.6) with ESMTP id gBQKl1eC025353 for ; Thu, 26 Dec 2002 14:47:01 -0600 (CST) (envelope-from kirk@strauser.com) Received: from pooh.honeypot.net (localhost [127.0.0.1]) by pooh.honeypot.net (8.12.6/8.12.6/Debian-8) with ESMTP id gBQKl1NZ005464 for ; Thu, 26 Dec 2002 14:47:01 -0600 Received: (from kirk@localhost) by pooh.honeypot.net (8.12.6/8.12.6/Debian-8) id gBQKl1LV005461 for freebsd-questions@freebsd.org; Thu, 26 Dec 2002 14:47:01 -0600 To: freebsd-questions@freebsd.org Subject: Re: Argument list too long: limitation in grep? bash? FreeBSD? References: From: Kirk Strauser Date: 25 Dec 2002 12:00:38 -0600 In-Reply-To: Message-ID: <87y96ef06x.fsf@pooh.honeypot.net> X-Mailer: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 19 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 At 2002-12-25T14:02:07Z, "Bill Moran" writes: > Ahhh ... so (making sure to understand this information so I can use it > again later) the quotes tell find to expand the pattern, without quotes > the shell tries to do it and results in the mentioned error. That's exactly correct. Your original command was asking Bash to expand the command-line to: grep '__FILE__' file1.html file2.html file3.html ... file3000.html and that's just too many arguments to be passing around. By quoting '*.html', `find' is doing the pattern-matching internally, and it can do this without an upper bound on the number of files it can match. -- Kirk Strauser In Googlis non est, ergo non est. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message