how to write a process-pool bash shell May 19, 2023 by Tarik Use xargs: xargs -P <maximum-number-of-process-at-a-time> -n <arguments-per-process> <command> Details here.