🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #1182

Re: Arg list too long

#1182
From: Richard Smith
Date: Thu, 17 Feb 1994 05:26
29 lines
2273 bytes
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 |
+------------------------------------------------------------------------+
Technical Details
Message-ID: <rsmithCLCsGD.4LC@netcom.com>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!bloom-beacon.mit.edu!ai-lab!prep.ai.mit.edu!gnu
References: <1994Feb14.181931.12695@beaver.cs.washington.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10038b,c8d3cfa5040fa372
X-Google-Attributes: gid10038b,public
X-Google-Thread: 134180,c8d3cfa5040fa372
X-Google-Attributes: gid134180,public
X-Google-ArrivalTime: 1994-02-16 21:26:36 PST
Newsgroups: gnu.bash.bug,biz.sco.opendesktop
From: rsmith@netcom.com (Richard Smith)
Subject: Re: Arg list too long
Message-ID: <rsmithCLCsGD.4LC@netcom.com>
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <1994Feb14.181931.12695@beaver.cs.washington.edu>
Date: Thu, 17 Feb 1994 05:26:36 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!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!bloom-beacon.mit.edu!ai-lab!prep.ai.mit.edu!gnu
Followup-To: gnu.bash.bug,biz.sco.opendesktop
Lines: 30