| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Suggested by: jhb
|
|
|
|
|
|
|
|
|
|
|
|
| |
the child process, before executing the command. This is very useful
when you do stuff like ``find ... | xargs interactive_application''.
Without -o, the application would inherit the pipe as its stdin, and
you thus lose any control over it.
This flag has been carefully chosen to not conflit with other options
of other xargs utilities like GNU xargs.
Reviewed by: jmallett
|
|
|
|
|
|
|
| |
replace to support magic values less than zero, which mean to just go nuts
and expand as many as we want.
MFC after: 2 weeks
|
| |
|
|
|
|
|
| |
PR: 47170
Submitted by: Gary W. Swearingen <swear@attbi.com> (original version)
|
| |
|
| |
|
|
|
|
| |
in parallel. Idea from GNU xargs.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.
Suggested by: bde
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
This corrects a problem whereby xargs could not walk the environment table
to count the amount of space it used, and treated it as if it were empty.
This problem was introduced in rev 1.15.
MFC after: 2 days
|
|
|
|
|
| |
main()'s argv argument is char*[], and functions that may inherit that arg
should use char*[] as well.
|
|
|
|
| |
behaviour with NULL match string, as that has changed over time.
|
|
|
|
|
|
| |
replstr for -J that will be interpereted by the shell.
MFC after: 1 day
|
|
|
|
| |
Use the literal string 'PWB UNIX', as we still have no .At macro for it.
|
|
|
|
| |
chunk.
|
|
|
|
|
|
|
| |
than triggering a usage(). Allow -R and -I to be specified in any order, and
thus change how -R checks for -I not being given and triggering a usage().
Partially requested by: gad
|
|
|
|
| |
a nil-string.
|
| |
|
|
|
|
|
| |
substitution if `utility' is not specified and we're using the buildin echo;
It has no arguments for us to abuse.
|
|
|
|
| |
Submitted by: fenner
|
| |
|
|
|
|
|
| |
a line of input, and both work differently, so prevent them from both being
passed to xargs(1).
|
|
|
|
|
|
|
|
|
|
|
|
| |
the prompt in their native language.
Also make the prompt fit what POSIX asks for (?...).
This should not affect use of -p with yes(1) [as every locale I know of matches
'y' as YESEXPR as well], but that's what -t is for anyway. -p is meant to be
really used interactively.
Submitted by: tjr, jmallett
|
|
|
|
|
|
| |
Submitted by: Carl Schmidt <cschmidt@slackerbsd.org>
Wrap an obscenely long line while I'm here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
out the parse loop to a seperate function, and move local variables around as
is needed. To keep the state of some variables and keep from having huge arg
lists to functions, make a bunch global.
Change use of err(3) in situations where malloc(3) will be setting errno to
errx(3) since assuming malloc(3) sets errno is non-portable, and provides no
more useful information in the context of FreeBSD.
Submitted by: bde (err/errx), Carl Schmidt <cschmidt@slackerbsd.org> (some
of the movement of the input loop to a function)
Approved by: src/tools/regression/usr.bin/xargs
|
|
|
|
| |
Submitted by: Carl Schmidt <cschmidt@slackerbsd.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument list to NULL, to terminate the arguments passed
to execvp(2).
Thanks to: bde (for pointing out some missing parens)
And with apologies to Ozzy Osbourne:
On his way to dinner
It took him by surprise
When an email from bde
Said his code was full of lies
Style (indentation)
And his bracing were all wrong
He casted to size_t
When he should have cast to long
I don't mind
Single letter identifiers
Unwrapped Line
Over 80 chars
Far over 80 chars
Who can we get to send diffs
We need Bruce D. Evans
Shows you comparason to his
We need Bruce D. Evans again
|
|
|
|
|
|
|
| |
s1 was 0 length, and replstr was 0 length, etc., we would end up subtracting
one from zero and seeing if it was greater than the size_t (unsigned) var
maxsize... This would cause us to return a string consisting of essentially
only match, which is not the right behaviour if we have 0 length inpline.
|
|
|
|
|
|
|
| |
it. It handles everything (right now) that needs done before run(), except
the -J case, because while that would be easy, I don't quite understand -J.
Reviewed by: src/tools/regression/usr.bin/xargs
|
| |
|
|
|
|
|
|
|
|
|
| |
it easier to understand. Making it easy to understand isn't all that easy,
so litter the code with comments so some other poor soul can come along some
day and work on this if they see fit to do so. Avoid calling strlen(3) to
check for a nil-string, when we can just check for *str=='\0'.
Approved by: src/tools/regression/usr.bin/xargs/
|
| |
|
|
|
|
| |
Requested by: bde, mike
|
| |
|
|
|
|
|
|
|
| |
same on Alpha and lint(1) pointed that out.
lint(1) on the same architecture pointed out how silly a cast to (u_int) to
malloc(3)'s argument was. Change that to size_t.
|
| |
|
|
|
|
|
|
|
|
| |
use of replstr and lack of Iflag), and add -R, which when given with
-I controls the number of arguments on which replacement will be done.
Some people happen to think it's idiotic to limit to 5 arguments, so
let the user override it if they like.
|
|
|
|
|
| |
Make 'this' not a local variable, since it isn't necessary or complex enough
to warrant such.
|
|
|
|
|
|
|
|
| |
corrupt memory. Simplifies the code in one or two places, also removes some
code that looks like it was bogus or incomplete.
Update strnsubst to have one or two extra conditions which maybe would make
it more efficient, or at least more versatile. This is likely a no-op.
|
|
|
|
| |
Submitted by: fenner
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merge xargs(1) with that of xMach.
Bring in xargs(1) changes to add -L and -I as per the Single Unix Specification
version 3. Proper exit status numbers are implemented, and the manual page has
been updated to reflect reality.
The code has been ANSIfied, and a new file has been added to xargs(1) to do the
substring substitution as SUSv3 requires.
Traditional behaviour should not be affected, use of -J should be deprecated
in favor of the more portable -I (though -J has been left, for now).
Submitted by: me, tjr (the exit status stuff)
Obtained from: xMach
|
|
|
|
|
| |
Reviewed by: mike
Approved by: mike
|
|
|
|
|
|
|
|
| |
fails, errno is saved to a volatile variable that the parent later inspects.
PR: bin/34898
Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
MFC after: 1 week
|
|
|
|
|
|
| |
is to put a copyright in the object file.
Submitted by: bde
|
| |
|
| |
|