Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • With that command lines, the files are not passed to runSh.sh, and there's a special quote and blank handling by xargs. -L combined with -I makes little sense. Maybe you meant xargs -t -P4 -n1 -d '\n' -a files.txt runSh.sh Commented Mar 12, 2021 at 18:14
  • Well, it works. It runs 4 commands at a time, when they finish it automatically starts the next one in the file such that there are always 4 running. The question I have is, can I append new lines to files.txt while xargs has already started and have it add them to the running queue, or do I have to wait for xargs to complete and then restart it with a new files.txt. Commented Mar 12, 2021 at 18:45