On 27/08/2014 at 08:38, Ole Tange <o...@tange.dk> wrote: > Or even: > > parallel_with_daemon --slf original.slf [... other parallel options ...]
Hi, I've implemented a portable shell script that does that, please check it out: https://github.com/daaugusto/gnuparallel Its syntax is: parallel-update_slf.sh --slf <file> [--sleep <n>] [--timeout <n[%]>] -- [... GNU Parallel's command options ...] For example: seq 0 10 100 | parallel-update_slf.sh --slf original.slf -- 'sleep {}; echo $(hostname) ran sleep for {}s' > How is cleanup done? How is cleanup done if the user presses Ctrl-C? The cleanup is implemented through 'traps' and works on either normal termination (EXIT) or when the user presses Ctrl-C (INT). > What happens if the users run multiple instances? With different original.slf? I made sure that each instance has unique temporary files, so I believe there is no problem running multiple instances. Feel free to suggest improvements and to distribute the script along with GNU Parallel if you would like to. -- Douglas A. Augusto