Date: Mon, 16 Jul 2001 22:22:14 -0700 From: Dima Dorfman <dima@unixfreak.org> To: parv <parv_@yahoo.com> Cc: Andreas Klemm <andreas@FreeBSD.ORG>, freebsd-stable@FreeBSD.ORG Subject: Re: of shell, find, and (g)xargs (Re: mass uninstall all ports?) Message-ID: <20010717052214.E58793E28@bazooka.unixfreak.org> In-Reply-To: <20010716120325.A1149@moo.holy.cow>; from parv_@yahoo.com on "Mon, 16 Jul 2001 12:03:25 -0400"
next in thread | previous in thread | raw e-mail | index | archive | help
parv <parv_@yahoo.com> writes: > ...but since freebsd's xargs doesn't support anything like gnu xargs' '-i' Yes it does. Here's an excerpt from xargs(1): -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 effect 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 It's not compatible with -i, but it would've served your purpose. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010717052214.E58793E28>