[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #4916] [PATCH] xargs -J (FreeBSD compatibility)
From: |
Andreas Metzler |
Subject: |
[patch #4916] [PATCH] xargs -J (FreeBSD compatibility) |
Date: |
Sat, 18 Feb 2006 09:54:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 |
Follow-up Comment #1, patch #4916 (project findutils):
Afaict from
http://www.freebsd.org/cgi/man.cgi?query=xargs&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html
and
http://www.openbsd.org/cgi-bin/man.cgi?query=xargs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
-I and -J provide *different* functionality on *BSD (especially replacing all
or only the first occurence of replstring), so this patch seems to be bogus.
---------------------------
-I replstr
Execute utility for each input line, replacing one or more occur-
rences of replstr in up to replacements (or 5 if no -R flag is
specified) arguments to utility with the entire line of input.
The resulting arguments, after replacement is done, will not be
allowed to grow beyond 255 bytes; this is implemented by concate-
nating as much of the argument containing replstr as possible, to
the constructed arguments to utility, up to 255 bytes. The 255
byte limit does not apply to arguments to utility which do not
contain replstr, and furthermore, no replacement will be done on
utility itself. Implies -x.
-J replstr
If this option is specified, xargs will use the data read from
standard input to replace the first occurrence of replstr instead
of appending that data after all other arguments. This option
will not affect how many arguments will be read from input (-n),
or the size of the command(s) xargs will generate (-s). The
option just moves where those arguments will be placed in the
command(s) that are executed. The replstr must show up as a dis-
tinct argument to xargs. It will not be recognized if, for
instance, it is in the middle of a quoted string. Furthermore,
only the first occurrence of the replstr will be replaced. For
example, the following command will copy the list of files and
directories which start with an uppercase letter in the current
directory to destdir:
/bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir
--------------------
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=4916>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/