At 10:10 PM -0500 11/25/02, David S. Jackson wrote:
Hi,
I've been trying to use |xargs -J [] mv [] [].suffix
but to no avail.
I've tried |xargs -J mv \[\] \[\].suffix and variations but that
doesn't seem to work either. It seems to work fine with the -i
command under GNU xargs, but not under Freebsd.
If you're using '-i' with GNU xargs, then you probably don't want
'-J' on the xargs in freebsd. -J is meant to solve a problem that
can not be handled via -I.
An example would be
$ touch one two three
$ ls one two three | xargs -J [] mv [] [].suffix
I should now have one.suffix two.suffix three.suffix. At least,
that's what happens with GNU and the -i \{\}. (FreeBSD manpage
says to use -J [] without escapes though.)
Can anyone lend me a clue here please?
The man page for xargs says:
Furthermore, only the first occurrence of the
replstr will be replaced.
in the description of -J.
For your example, what you should use is -I, not -J.
--
Garance Alistair Drosehn = [EMAIL PROTECTED]
Senior Systems Programmer or [EMAIL PROTECTED]
Rensselaer Polytechnic Institute or [EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message