[bug #61009] xargs need option to immediately stop on command fail

James Youngman <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #4, bug #61009 (project findutils):

The proposed 

find . -type f | xargs -IX -n1 sh -c "cp -f X $IMGDIR_DST/X || exit 255" ||
exit 1


can be implemented more efficiently without using the hypothetical -F flag:

find . -type f -exec cp -t "${IMGDIR_DST}" {} + -o -quit

This approach is also less "complex and error prone" than the approach using
xargs and lots of flags.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61009>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.