bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to deal with space in command line?


From: Greg Wooledge
Subject: Re: How to deal with space in command line?
Date: Mon, 11 Oct 2010 09:02:25 -0400
User-agent: Mutt/1.4.2.3i

On Mon, Oct 11, 2010 at 02:56:50PM +0200, Sven Mascheck wrote:
> > If there is an absolute requirement to put *all* the files on a single
> > command, "-exec +" may fail to satisfy it.  It might break up the files
> > into groups.
> 
> Yes, but the same limit (ARG_MAX) gets hit, as soon as you call an external
> command, like "vi "address@hidden" in the example above.

"-exec +" may break things into groups that are smaller than ARG_MAX.
There's no guarantee how big the groups are.  Also, if you truly must
have them all in one invocation, it may be better to fail and get a
nice friendly error, than to have the command run with only a subset of
the files.

This is where obfuscation of examples (e.g. replacing whatever-it-is with
'vi' or 'ls') causes issues.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]