On Mon, Nov 25, 2002 at 10:10:03PM -0500, 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.
> 
> 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?
> 
> TIA.
> 
> -- 
> David S. Jackson                        [EMAIL PROTECTED]

Two things.  First, from `man xargs`:
"Furthermore, only the first occurrence of the replstr will be
replaced."  Second, maybe a different tool would be better.  How 
about:
$ for file in `ls one two three`; do move $file $file.suffix; done

Nathan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to