Timo Buhrmester said:
> On Sat, Mar 05, 2016 at 02:39:41AM +0100, Dmitrij D. Czarkoff wrote:
> > > This breaks doing something along the lines of ``yes n | cp -i [...]''
> >
> > Why would anyone want that?
>
> To simulate what in FreeBSD's and GNU's implementation of cp is the
> -n option, i.e. to only copy files that don't already exist at the
> destination.
>
> I'm not saying it is pretty, it just seems to be the only way to
> convince cp to do that, without relying on non-POSIX options.
So the goal of the diff is to replace something like
$ for src in ${files}; do [ -r "$src" ] && cp ${src} dst/; done
with
$ yes n | cp -i ${files} dst/
? Well, I guess you can save some performance this way, but it is just
too ugly to make sense.
I'd rather add "-n" flag.
--
Dmitrij D. Czarkoff