🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #1183

Re: Arg list too long

#1183
From: Jim Maddox
Date: Wed, 23 Feb 1994 02:53
59 lines
3076 bytes
rsmith@netcom.com (Richard Smith) writes:

>gnu-bash-bug@cs.washington.edu wrote:
>> I installed bash (Bourne Again SHell) on my ODT 3.0 (Sco Unix 3.2v4.2)
>> system on the suggestion that it would get rid of my "arg list too long"
>> errors when doing simple commands like ls, mv, cp, rm, etc.  However it
>> didn't.  Where is this coming from?  Is there some parameter I can increase
>> when building bash?  Is it the command itself that has the limitation?  Is
>> it the system exec call?  Any helpful suggestions would be appreciated.

>I'm no wizard, but this ain't no shell problem.  When you run a command
>like "ls *.*" or "mv * <some directory>" all the shell does is expand the
>wildcard into a list of filenames.  It is the program itself (/bin/ls,
>/bin/mv) that's choking.  Adding memory or tweeking kernel parameters may
>help, but the "usual" way around this is to wrap your command in a shell
>script:

>for file in $*
>do
>(command) $file (whatever...)
>done

>If you're into Perl, try using that too.  It's usually a little smarter
>about memory.

>Hope this helps.
>--
>+------------------------------------------------------------------------+
>| Richard S. Smith  | PROGRESS(tm) 4GL Developer | Monrovia, California  |
>| rsmith@netcom.com | "Holding my breath for V7" | Voice: (818) 303-7346 |
>+------------------------------------------------------------------------+

Try using the xargs(C) command. This should allow you to clear up you
problem.

BTW this is exactly a shell problem. Running the following will
demonstrate it on your system.

|# strings /bin/sh |grep 'too long'
|arg list too long
|sh error: pwd too long
|# strings /bin/ksh |grep 'too long'
|arg list too long
|name too long
|# strings /bin/csh |grep 'too long'
|Word too long
|Arguments too long
|Pathname too long
|Word too long
|Word too long
|Rhs too long
|Arg list too long
|Filename too long

Note that sh, ksh, and csh all contain the message text 'Arg list too long'
although the 'A' isn't capitalized in sh and ksh.
-- 
Jim Maddox (703)827-3298
maddoxj@hfsi.com
Technical Details
Message-ID: <1994Feb23.025351.20822@hfsi.hfsi.com>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!agate!howland.reston.ans.net!cs.utexas.edu!sdd.hp.com!apollo.hp.com!bloom-beacon.mit.edu!ai-lab!prep.ai.mit.edu!gnu
References: <1994Feb14.181931.12695@beaver.cs.washington.edu> <rsmithCLCsGD.4LC@netcom.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 134180,c8d3cfa5040fa372
X-Google-Attributes: gid134180,public
X-Google-Thread: 10038b,c8d3cfa5040fa372
X-Google-Attributes: gid10038b,public
X-Google-ArrivalTime: 1994-02-22 18:53:51 PST
Received-Date: Tue, 22 Feb 1994 22:07:30 EST
Newsgroups: gnu.bash.bug,biz.sco.opendesktop
From: maddoxj@hfsi.hfsi.com (Jim Maddox)
Subject: Re: Arg list too long
Message-ID: <1994Feb23.025351.20822@hfsi.hfsi.com>
Organization: HFSI
References: <1994Feb14.181931.12695@beaver.cs.washington.edu> <rsmithCLCsGD.4LC@netcom.com>
Date: Wed, 23 Feb 1994 02:53:51 GMT
Apparently-To: gnu-bash-bug@uunet.uu.net
Distribution: world
Approved: info-gnu@prep.ai.mit.edu
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!agate!howland.reston.ans.net!cs.utexas.edu!sdd.hp.com!apollo.hp.com!bloom-beacon.mit.edu!ai-lab!prep.ai.mit.edu!gnu
Followup-To: gnu.bash.bug,biz.sco.opendesktop
Lines: 60