2011-05-31 18:04:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SERVER1=parallel-server3
|
|
|
|
SERVER2=parallel-server2
|
|
|
|
|
2011-07-17 01:03:57 +00:00
|
|
|
cat <<'EOF' | sed -e s/\$SERVER1/$SERVER1/\;s/\$SERVER2/$SERVER2/ | parallel -j0 -k
|
2011-05-31 18:04:46 +00:00
|
|
|
echo '### Test --return of weirdly named file'
|
2011-07-17 01:03:57 +00:00
|
|
|
stdout parallel --return {} -vv -S $SERVER1 echo '>'{} ::: 'aa<${#}" b'; rm 'aa<${#}" b'
|
|
|
|
|
|
|
|
echo '### Test if remote login shell is csh'
|
2011-07-20 23:58:23 +00:00
|
|
|
stdout parallel -k -vv -S csh@localhost 'echo $PARALLEL_PID $PARALLEL_SEQ {}| wc -w' ::: a b c
|
2011-05-31 18:48:00 +00:00
|
|
|
|
|
|
|
echo '### Test {} multiple times in different commands'
|
2011-05-31 21:12:03 +00:00
|
|
|
seq 10 | parallel -v -Xj1 echo {} \; echo {}
|
|
|
|
|
|
|
|
echo '### Test of -X {1}-{2} with multiple input sources'
|
|
|
|
parallel -j1 -kX echo {1}-{2} ::: a ::: b
|
|
|
|
parallel -j2 -kX echo {1}-{2} ::: a b ::: c d
|
|
|
|
parallel -j2 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
|
|
parallel -j0 -kX echo {1}-{2} ::: a b c ::: d e f
|
|
|
|
|
|
|
|
echo '### Test of -X {}-{.} with multiple input sources'
|
|
|
|
parallel -j1 -kX echo {}-{.} ::: a ::: b
|
|
|
|
parallel -j2 -kX echo {}-{.} ::: a b ::: c d
|
|
|
|
parallel -j2 -kX echo {}-{.} ::: a b c ::: d e f
|
|
|
|
parallel -j0 -kX echo {}-{.} ::: a b c ::: d e f
|
2011-09-08 08:53:26 +00:00
|
|
|
|
|
|
|
echo '### Test of -r with --pipe - the first should give an empty line. The second should not.'
|
|
|
|
echo | parallel -j2 -N1 --pipe cat | wc -l
|
|
|
|
echo | parallel -r -j2 -N1 --pipe cat | wc -l
|
2011-07-17 01:03:57 +00:00
|
|
|
EOF
|