From owner-freebsd-hackers Sat Jan 5 12:49: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 352DD37B427 for ; Sat, 5 Jan 2002 12:48:34 -0800 (PST) Received: (from olli@localhost) by lurza.secnetix.de (8.11.6/8.11.6) id g05KmeW55815; Sat, 5 Jan 2002 21:48:40 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Date: Sat, 5 Jan 2002 21:48:40 +0100 (CET) Message-Id: <200201052048.g05KmeW55815@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG Reply-To: freebsd-hackers@FreeBSD.ORG Subject: Re: Overriding ARG_MAX In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.4-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Miller wrote: > What I usually want to do is something more like ls *.out |wc -l ls | grep '\.out$' | wc -l > or grep something *.data ls | grep '\.data$' | xargs grep something > or cat *.foo | grep something. ls | grep '\.foo$' | xargs cat | grep something In general, changing ARG_MAX is bad for several reasons. - It makes your commands nonportable. - It only hides the actual problem without really solving it. - It just moves the limit further away, but it doesn't remove it. The alternative commands that I suggested above are portable and work for _any_ number of files, no matter what the ARG_MAX limit is. Sure, they're a bit longer to type, but if you're concerned about that, then you could wrap them into small scripts or shell functions. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message