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
|
2020-08-07 20:20:30 +00:00
|
|
|
SERVER2=parallel-server3
|
|
|
|
SSHUSER1=vagrant
|
|
|
|
SSHUSER2=vagrant
|
|
|
|
SSHUSER3=vagrant
|
|
|
|
SSHLOGIN1=$SSHUSER1@$SERVER1
|
|
|
|
SSHLOGIN2=$SSHUSER2@$SERVER2
|
|
|
|
SSHLOGIN3=$SSHUSER3@$SERVER3
|
|
|
|
|
|
|
|
#SERVER1=parallel-server1
|
|
|
|
#SERVER2=parallel-server2
|
2010-06-04 00:16:50 +00:00
|
|
|
|
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
|
2020-08-07 20:20:30 +00:00
|
|
|
(echo 1; echo 1) | PARALLEL="-S$SSHLOGIN1 -Sssh\ -l\ $SSHUSER2\ $SERVER2 -j1" parallel -kv hostname\; echo | sort
|
2010-11-13 13:57:39 +00:00
|
|
|
|
|
|
|
echo '### Test $PARALLEL - multi line'
|
2020-08-07 20:20:30 +00:00
|
|
|
(echo 1; echo 1) | PARALLEL="-S$SSHLOGIN1
|
|
|
|
-Sssh\ -l\ $SSHUSER2\ $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'
|
2020-08-07 20:20:30 +00:00
|
|
|
echo "-S$SSHLOGIN1 -Sssh\ -l\ $SSHUSER2\ $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'
|
2020-08-07 20:20:30 +00:00
|
|
|
echo "-S$SSHLOGIN1
|
|
|
|
-Sssh\ -l\ $SSHUSER2\ $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
|