I'm compiling a huge list of commands (all doing the same thing) I want executed, but as it takes a long time to compile that list, I would like execution to begin before I'm done (execution of each command typically takes longer than creating another, so there's no real risk of the list running dry).
The normal way to execute a list of commands, is to write a shell script listing the commands, but when I start execution of a script I can't add to it anymore.
The way I've found so far is to put the commands in
command.list and having
parallel --jobs 1 --line-buffer :::: command.list, but as it involves using
parallel (I'm using GNU parallel, I don't know if it will work with the program in more-utils) for non-parallel execution of things, I think it's a bit of an abuse of
Is there a simpler way of doing it? Something that tracks which commands have been executed in case I screw up something and the list does run out, would be nice.