summaryrefslogtreecommitdiffstats
path: root/usr.bin/xargs
Commit message (Collapse)AuthorAgeFilesLines
* Revive '-opt' flags which I accidentally removed.keramida2008-01-271-1/+1
| | | | Noticed by: simon
* Document the no-op -r option of BSD xargs(1).keramida2008-01-261-2/+30
| | | | | | PR: docs/106416 Submitted by: Pete Slagle, freebsd-stable at voidcaptain.com MFC after: 3 days
* Markup fixes.ru2006-09-291-3/+3
|
* NUL terminate buffer from fgetln(3). From fgsch@OpenBSD.jmallett2006-01-011-0/+1
|
* Whitespace after switch.jmallett2006-01-011-3/+3
| | | | Inspired by: OpenBSD
* Check the entire length of the current argument for the EOF string with -E,jmallett2005-12-311-1/+1
| | | | | | | | | | | | | but don't expect a proper ASCII string to exist right here right now, don't use strcmp(3) which checks for a NUL. As we're still building the argument up, the next character might be garbage. It would probably be just as safe to temporarily write a NUL there, but if we've reached the end of argument memory that might not be the best idea, I think. It's unclear. Doing it this way seems to meet the most with the original intent. PR: 85696 Prodded by: stefanf
* Add a FreeBSD-specific -S flag which controls the maximum size of an argumentjmallett2005-12-302-10/+34
| | | | having replacements done in it via -I.
* Handle maxsize==0 in such a way that we don't modify the string.jmallett2005-12-301-0/+12
|
* Wording tweaks.des2005-12-071-3/+2
| | | | | PR: not quite docs/84620 MFC after: 2 weeks
* Add -r option for GNU compatibility.des2005-12-071-1/+4
| | | | MFC after: 2 weeks
* Sync program's usage() with manpage's SYNOPSIS.ru2005-05-211-1/+1
|
* MFC 1.22: Fix -0 vs -L/-I processing, mainly so that 'xargs -0 -I []' willgad2005-02-271-2/+9
| | | | | | | do something sensible (namely: treat then '\0' as the EOL character, when deciding what "a line" is for -N). Note that -I implies -N. MFC after: 3 days
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Modify behaviour of `xargs -I` in order to:cperciva2004-10-181-2/+2
| | | | | | | | | | | | | | | | | 1. Conform to IEEE Std 1003.1-2004, which state that "Constructed arguments cannot grow larger than 255 bytes", and 2. Avoid a buffer overflow. Unfortunately the standard doesn't indicate how xargs is supposed to handle arguments which (with the appropriate substitutions) would grow larger than 255 bytes; this solution handles those by making as many substitutions as possible without overflowing the buffer. OpenBSD's xargs resolves this in a different direction, by making all the substitutions and then silently truncating the resulting string. Since this change may break existing scripts which rely upon the buffer overflow (255 bytes isn't really all that long...) it will not be MFCed.
* Document incorrect handling of multibyte characters with -I and -J options.tjr2004-08-021-1/+10
|
* Call setlocale() with category LC_ALL instead of LC_MESSAGES. We needtjr2004-07-121-1/+1
| | | | | | LC_CTYPE and LC_COLLATE to correctly interpret regular expressions returned by nl_langinfo(YESEXPR), and it doesn't hurt to include the rest.
* Fix spelling error in my own paragraph.dd2004-06-281-1/+1
|
* - Use _PATH_TTY and _PATH_DEVNULL macros.mux2003-06-131-5/+9
| | | | | | | | | | | - Don't fail if we can't open /dev/null since this can happen if xargs is jail'ed or chroot'ed. These fixes were submitted by Todd Miller from the OpenBSD project. There was one problem in those fixes that broke -o, which is corrected here and should be committed to the OpenBSD repo by Todd soon. MFC in: 3 days
* Use waitpid, instead of wait3, which is more portable.jmallett2003-06-131-2/+2
| | | | | | Submitted by: "Todd C. Miller" <Todd.Miller@courtesan.com> Obtained from: OpenBSD Reviewed by: tjr
* Remove redundant return; from void function.jmallett2003-06-131-1/+0
| | | | | Submitted by: "Todd C. Miller" <Todd.Miller@courtesan.com> Obtained from: OpenBSD
* Markup bits.ru2003-05-211-1/+1
| | | | Approved by: re (blanket)
* Don't shaddow exp(3).obrien2003-05-031-6/+5
|
* Migrate to a new way of dealing with building from old revisions ofimp2003-04-051-14/+1
| | | | | | | | | | | | | | | | | FreeBSD. This method attempts to centralize all the necessary hacks or work arounds in one of two places in the tree (src/Makefile.inc1 and src/tools/build). We build a small compatibility library (libbuild.a) as well as selectively installing necessary include files. We then include this directory when building host binaries. This removes all the past release compatibilty hacks from various places in the tree. We still build on tip of stable and current. I will work with those that want to support more, although I anticipate it will just work. Many thanks to ru@, obrien@ and jhb@ for providing valuable input at various stage of implementation, as well as for working together to positively effect a change for the better.
* Simplify compatibility ifdef.imp2003-04-041-4/+7
|
* xargs(1) is WARNS=6 clean.mux2003-03-281-1/+1
| | | | Tested on: i386, sparc64
* When -o isn't specified, open /dev/null as stdin.mux2003-03-281-2/+5
| | | | Suggested by: jhb
* Add a new -o option to tell xargs(1) to reopen /dev/tty as stdin inmux2003-03-232-5/+21
| | | | | | | | | | | | 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
* Extend our -R extension which sets the number of arguments in which -I willjmallett2003-02-262-3/+9
| | | | | | | 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
* De-typo usage string.jmallett2003-02-261-1/+1
|
* A few changes for clarity.trhodes2003-01-271-13/+17
| | | | | PR: 47170 Submitted by: Gary W. Swearingen <swear@attbi.com> (original version)
* english(4) police.schweikh2002-12-271-1/+1
|
* mdoc(7) police: most -mdoc macros can take multiple arguments.ru2002-12-231-2/+1
|
* Add the -P option which executes multiple copies of the specified utilitytjr2002-12-212-19/+57
| | | | in parallel. Idea from GNU xargs.
* Take __FreeBSD_version into account when BOOTSTRAPPING.ru2002-11-132-9/+7
|
* Fix typos; each file has at least one s/seperat/separat/schweikh2002-08-111-2/+2
| | | | | | | | | | (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
* Declare environ as char **environ like in environ(7), not char *environ[].tjr2002-07-011-1/+1
| | | | | | | | 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
* Stylistic nit:jmallett2002-06-221-5/+5
| | | | | main()'s argv argument is char*[], and functions that may inherit that arg should use char*[] as well.
* Check for results of repeated calls to strnsubst(), as well as for thejmallett2002-06-221-6/+17
| | | | behaviour with NULL match string, as that has changed over time.
* When giving an example that relies on shell expansion/globbing, don't use ajmallett2002-06-221-1/+1
| | | | | | replstr for -J that will be interpereted by the shell. MFC after: 1 day
* Note that this appeared at least as early as PWB UNIX.jmallett2002-06-101-0/+4
| | | | Use the literal string 'PWB UNIX', as we still have no .At macro for it.
* Err, duh, free(3) doesn't set its argument to NULL... Fix realloc of a freedjmallett2002-06-041-1/+3
| | | | chunk.
* Restructure sanity checks so that -I and -J just override eachother, ratherjmallett2002-05-301-5/+6
| | | | | | | 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
* Allow the input line to be NULL, and teach strnsubst() that NULL means to usejmallett2002-05-302-3/+8
| | | | a nil-string.
* mdoc(7) police: punctuation, miscellaneous.ru2002-05-301-8/+8
|
* Simplify prerun() in the case where there are no arguments. Can't do -I or -Jjmallett2002-05-171-1/+1
| | | | | substitution if `utility' is not specified and we're using the buildin echo; It has no arguments for us to abuse.
* Fix a "tiny and squeeby and little" markup mistake.jmallett2002-05-141-1/+1
| | | | Submitted by: fenner
* xargs.c,v 1.33 broke the upgrade path from old versions of 4.x and 5.0.ru2002-05-102-1/+13
|
* -I and -J both set the same variable, replstr, to the string to replace withjmallett2002-05-061-0/+2
| | | | | a line of input, and both work differently, so prevent them from both being passed to xargs(1).
* Modify the -p implementation to use a user's locale, so they can respond tojmallett2002-05-052-13/+63
| | | | | | | | | | | | 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
* Fix a typo.jmallett2002-05-051-2/+3
| | | | | | Submitted by: Carl Schmidt <cschmidt@slackerbsd.org> Wrap an obscenely long line while I'm here.
OpenPOWER on IntegriCloud