On 25/08/2014 at 21:41, Ole Tange <o...@tange.dk> wrote: > Great. I think it will make sense to expand the section on --sshloginfile.
Hi, You have already updated the man file, describing how to keep the server list up-to-date. Thanks! I'd like, though, to propose some modifications to the script. Here is the modified script: cat original.slf > updated.slf while [ 1 ] ; do nice parallel --timeout 10 --nonall -j0 -k --slf original.slf --tag echo | sed -e 's/\t$//' -e '/\t/d' > tmp.slf if ! cmp -s tmp.slf updated.slf; then cat tmp.slf > updated.slf fi sleep 10 done parallel --slf updated.slf ... Some explanation: - Changed 'perl' to 'sed' (the former didn't work) - Added pattern '/\t/d' to remove spurious lines such as (when ssh echoes some error message): server.net /usr/bin/xauth: error in locking authority file ... - 'cmp' instead of 'diff' because it is faster (and silent!) - '--timeout 10' to make the script more robust (for instance, killing ssh attempts to servers that ask for password) - 'cat' instead of 'mv' to prevent changing the file descriptor (I'm not sure if this affects the way GNU Parallel handles file updates) -- Douglas A. Augusto