On Sat, 5 Mar 2016, Dmitrij D. Czarkoff wrote:
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/
The former line doesn't prevent you from overwriting files in dst/ . More
tests are necessary, which are in my opinion too complex for a simple
interactive command line.
I've had burnt my hands a few times already with
$ yes n | cp -i ${files} dst/
not working in agreement with the man page. Thank you, Timo, for bringing
this up.
Regards,
David