2010-08-21 23:29:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-08-07 20:20:30 +00:00
|
|
|
SERVER1=parallel-server1
|
|
|
|
SERVER2=parallel-server2
|
|
|
|
SSHUSER1=vagrant
|
|
|
|
SSHUSER2=vagrant
|
|
|
|
SSHLOGIN1=$SSHUSER1@$SERVER1
|
|
|
|
SSHLOGIN2=$SSHUSER2@$SERVER2
|
|
|
|
|
2018-09-20 22:15:14 +00:00
|
|
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -vj10 -k --joblog /tmp/jl-`basename $0` -L1 -r
|
2010-08-21 23:29:26 +00:00
|
|
|
echo '### Test of --eta'
|
2014-02-16 15:34:47 +00:00
|
|
|
seq 1 10 | stdout parallel --eta "sleep 1; echo {}" | wc -l
|
2010-08-21 23:29:26 +00:00
|
|
|
|
2010-08-26 18:03:59 +00:00
|
|
|
echo '### Test of --eta with no jobs'
|
2014-02-16 15:34:47 +00:00
|
|
|
stdout parallel --eta "sleep 1; echo {}" < /dev/null
|
2010-08-26 18:03:59 +00:00
|
|
|
|
2010-08-21 23:29:26 +00:00
|
|
|
echo '### Test of --progress'
|
2014-02-16 15:34:47 +00:00
|
|
|
seq 1 10 | stdout parallel --progress "sleep 1; echo {}" | wc -l
|
2010-08-26 18:03:59 +00:00
|
|
|
|
|
|
|
echo '### Test of --progress with no jobs'
|
2014-02-16 15:34:47 +00:00
|
|
|
stdout parallel --progress "sleep 1; echo {}" < /dev/null
|
2011-10-17 22:04:20 +00:00
|
|
|
|
2012-08-06 22:52:08 +00:00
|
|
|
echo '### --timeout --onall on remote machines: 2*slept 1, 2 jobs failed'
|
2020-08-07 20:20:30 +00:00
|
|
|
parallel -j0 --timeout 6 --onall -S localhost,$SSHLOGIN1 'sleep {}; echo slept {}' ::: 1 8 9 ; echo jobs failed: $?
|
2011-12-10 23:16:41 +00:00
|
|
|
EOF
|