> 
> Folks,
> 
> although there was much rejoicing, I think there's no need for a
> new option to cp. Just use the toolbox, it's not too hard:
> 
> (cat bigfilelist; echo destdir) | xargs cp
>
> Or even
>
> echo destdir >>bigfilelist
> xargs cp < bigfilelist
> 
> should do the trick.

No, it won't.  Consider a list of files  a, b, c, d.  You create input to 
xargs 'a b c d destdir', which it then splits into 'a b c' and 'd 
destdir'.  The first time cp is run, it will probably fail; the second 
time only 'd' ends up where you expect it.

The best solution to this is actually to fix xargs to accept a "command 
format string", eg.

  echo list | xargs "cp %s destdir"

Probably a better way to do it would be to have the insertion marker an 
option to xargs:

  echo list | xargs -s LIST_HERE cp LIST_HERE destdir

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



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

Reply via email to