On 11/09/2014 at 09:42, Ole Tange <o...@tange.dk> wrote: > It it starting to be as ugly as the sed command, but it might just be > more portable: We avoid having to deal with different odd dialects of > sed.
Thanks again. I think I finally managed to make the server update script works: cp original.slf updated.slf while [ 1 ] ; do nice parallel --timeout 1000% --nonall -j0 -k --slf original.slf --tag echo | \ sed -e 's#\t$##' -e '#\t#d' | \ nice parallel -k perl -ne \"\\\$host=\'{}\'";\\\$host=~s#\\\\\##g;/^(\d+\/)?\\\\Q\\\$host\\\\E\\\$/ and print and exit"\" original.slf > tmp.slf if ! cmp -s tmp.slf updated.slf; then mv tmp.slf updated.slf fi sleep 10 done & parallel --slf updated.slf ... Indeed, it is kind of ugly, but seems to get the job done (maybe it could be simplified, though). Will you consider updating the manpage with this newer version of the script? I'll think about how to wrap those commands within a daemon, but first I need to investigate why GNU Parallel is not respecting the number of slots on a host when servers are dynamically included/excluded. -- Douglas A. Augusto