2010-06-04 00:16:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-01-06 18:10:20 +00:00
|
|
|
SERVER1=parallel-server1
|
2010-06-04 00:16:50 +00:00
|
|
|
SERVER2=parallel-server2
|
|
|
|
|
2010-11-13 13:57:39 +00:00
|
|
|
echo '### Test $PARALLEL - single line'
|
2010-08-14 20:51:09 +00:00
|
|
|
echo | PARALLEL=--number-of-cpus parallel
|
2014-07-26 11:17:13 +00:00
|
|
|
(echo 1; echo 1) | PARALLEL="-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" parallel -kv hostname\; echo | sort
|
2010-11-13 13:57:39 +00:00
|
|
|
|
|
|
|
echo '### Test $PARALLEL - multi line'
|
2014-07-26 11:17:13 +00:00
|
|
|
(echo 1; echo 1) | PARALLEL="-Sparallel\@$SERVER1
|
2010-11-13 13:57:39 +00:00
|
|
|
-Sssh\ -l\ parallel\ $SERVER2
|
2014-07-26 11:17:13 +00:00
|
|
|
-j1" parallel -kv hostname\; echo | sort
|
2010-06-04 00:16:50 +00:00
|
|
|
|
2010-11-13 13:57:39 +00:00
|
|
|
echo '### Test ~/.parallel/config - single line'
|
2012-02-20 00:48:28 +00:00
|
|
|
echo "-Sparallel\@$SERVER1 -Sssh\ -l\ parallel\ $SERVER2 -j1" > ~/.parallel/config
|
2014-07-26 11:17:13 +00:00
|
|
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
2010-11-13 13:57:39 +00:00
|
|
|
|
|
|
|
echo '### Test ~/.parallel/config - multi line'
|
2012-02-20 00:48:28 +00:00
|
|
|
echo "-Sparallel\@$SERVER1
|
2010-11-13 13:57:39 +00:00
|
|
|
-Sssh\ -l\ parallel\ $SERVER2
|
2010-08-14 20:51:09 +00:00
|
|
|
-j1" > ~/.parallel/config
|
2014-07-26 11:17:13 +00:00
|
|
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
2010-08-14 20:51:09 +00:00
|
|
|
rm ~/.parallel/config
|