2013-12-19 01:19:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Simple jobs that never fails
|
|
|
|
# Each should be taking 0.3-1s and be possible to run in parallel
|
|
|
|
# I.e.: No race conditions, no logins
|
2014-07-15 00:40:38 +00:00
|
|
|
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -k -vj4 -L1
|
2013-12-19 01:19:19 +00:00
|
|
|
echo '### Test exit val - true';
|
|
|
|
echo true | parallel;
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
echo '**'
|
|
|
|
|
|
|
|
echo '### Test exit val - false';
|
|
|
|
echo false | parallel;
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
echo '**'
|
|
|
|
|
2014-09-23 18:14:57 +00:00
|
|
|
echo '### Test bug #43284: {%} and {#} with --xapply';
|
|
|
|
parallel --xapply 'echo {1} {#} {%} {2}' ::: a ::: b;
|
|
|
|
parallel -N2 'echo {%}' ::: a b
|
|
|
|
|
|
|
|
echo '**'
|
|
|
|
|
2014-10-14 20:56:03 +00:00
|
|
|
echo '### Test bug #43376: {%} and {#} with --pipe'
|
|
|
|
echo foo | parallel -q --pipe -k echo {#}
|
|
|
|
echo foo | parallel --pipe -k echo {%}
|
|
|
|
echo foo | parallel -q --pipe -k echo {%}
|
|
|
|
echo foo | parallel --pipe -k echo {#}
|
|
|
|
|
|
|
|
echo '**'
|
|
|
|
|
2013-12-19 01:19:19 +00:00
|
|
|
EOF
|