I’ve used xargs before to execute commands long enough that attempting them with backquotes fails. For example, if the list of files ‘c’ is too long, a checkin attempt like:
could generate an “environment too long” error in the shell. Something like:
is equivalent. This also checks in one file at a time, using all the filenames in the file ‘c’, but allows xargs to farm out the commands one at a time without building one giant execv argument. What I didn’t know was xargs has a parallelization option:
This does the same job, with -n 1 restricting xargs to passing one file at a time (which may not be necessary in this case), but starting 8 different processes for the work!