Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3F9F7FA3.6060809@free.fr>
Date: Wed, 29 Oct 2003 09:51:47 +0100
From: Nicolas BUONOMO <nb.listes@free.fr>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
X-Accept-Language: fr-fr, fr, en-us, en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: bash /usr/bin/ls invalid argument
References: <NGBBLLIAMFLGJEOAJCCEKEMODFAA.garbage_collector@telia.com>
In-Reply-To: <NGBBLLIAMFLGJEOAJCCEKEMODFAA.garbage_collector@telia.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id h9T8sBWB015892

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?

bye

> /Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
> -- printf("Timezone: %s\n", (DST)?"UTC+02":"UTC+01"); --
> --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/
> 
> 
> 



