From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2072 invoked by alias); 29 Oct 2003 14:26:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 2058 invoked from network); 29 Oct 2003 14:26:08 -0000 Received: from unknown (HELO smtp5.hy.skanova.net) (195.67.199.134) by sources.redhat.com with SMTP; 29 Oct 2003 14:26:08 -0000 Received: from P450 (t4o62p50.telia.com [195.198.199.170]) by smtp5.hy.skanova.net (8.12.10/8.12.10) with SMTP id h9TEQ6o5019568 for ; Wed, 29 Oct 2003 15:26:07 +0100 (CET) From: "Hannu E K Nevalainen" To: Subject: RE: bash /usr/bin/ls invalid argument Date: Wed, 29 Oct 2003 15:23:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <3F9F7FA3.6060809@free.fr> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-SW-Source: 2003-10/txt/msg01728.txt.bz2 > From: Nicolas BUONOMO > Sent: Wednesday, October 29, 2003 9:52 AM > Hello, > > Hannu E K Nevalainen a écrit : > > >>From: Jared Ingersoll > >>Sent: Monday, October 27, 2003 8:55 PM > > > > .... > > > > There is a 32KB length limit on the command line. This is > imposed on us by > > the underlying "OS" - i.e. not likely to change. > > > > > > To check how long your command line would be, try something like this: > > > > $ find -type f -name 'send.log.*' | > > ( > > read f; > > cc=-1; > > echo ""; > > while [ ! -z "$f" ];do > > cc=$(( 1 + $cc + $( echo "$f" | wc -c) )); > > echo -e "\e[F$cc\e[K";read f; > > done; > > echo -e "\e[F$cc chars" > > ) > > > > Remember to add the length of e.g. "ls -l " (note space). > > > > If this gives a number larger than... > > > > $ echo $(( ( 1 << 15 ) -1 )) > > 32767 > > > > ... then you're "outta luck". > > > > I try your command on a Microsoft XP pro and I win > > nicolas@cl12369n ~ s=1 > $ find -type f -name '*' | ( read f; cc=-1; echo ""; while > [ ! -z "$f" ]; do cc=$(( 1 + $cc + $( echo "$f" | wc -c) )); > echo -e "\e[F$cc\e[K";read f; done; echo -e "\e[F$cc chars"; ) > 1789980 chars > > Where is the problem? > =-) there is no problem with _my_ command. It was to show _when_ there is a problem - and what the problem consists of. Try "ls -l *" in the same directory as you did your test in. That will give you an error message, due to the limit mentioned earlier in this thread. /Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E -- printf("LocalTime: UTC+%02d\n",(DST)? 1:2); -- --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/