mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
35 lines
1,014 B
Bash
35 lines
1,014 B
Bash
#!/bin/bash
|
|
|
|
SERVER1=parallel-server1
|
|
SERVER2=parallel-server2
|
|
SERVER2=parallel-server3
|
|
SSHUSER1=vagrant
|
|
SSHUSER2=vagrant
|
|
SSHUSER3=vagrant
|
|
SSHLOGIN1=$SSHUSER1@$SERVER1
|
|
SSHLOGIN2=$SSHUSER2@$SERVER2
|
|
SSHLOGIN3=$SSHUSER3@$SERVER3
|
|
|
|
#SERVER1=parallel-server1
|
|
#SERVER2=parallel-server2
|
|
|
|
echo '### Test $PARALLEL - single line'
|
|
echo | PARALLEL=--number-of-cpus parallel
|
|
(echo 1; echo 1) | PARALLEL="-S$SSHLOGIN1 -Sssh\ -l\ $SSHUSER2\ $SERVER2 -j1" parallel -kv hostname\; echo | sort
|
|
|
|
echo '### Test $PARALLEL - multi line'
|
|
(echo 1; echo 1) | PARALLEL="-S$SSHLOGIN1
|
|
-Sssh\ -l\ $SSHUSER2\ $SERVER2
|
|
-j1" parallel -kv hostname\; echo | sort
|
|
|
|
echo '### Test ~/.parallel/config - single line'
|
|
echo "-S$SSHLOGIN1 -Sssh\ -l\ $SSHUSER2\ $SERVER2 -j1" > ~/.parallel/config
|
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
|
|
|
echo '### Test ~/.parallel/config - multi line'
|
|
echo "-S$SSHLOGIN1
|
|
-Sssh\ -l\ $SSHUSER2\ $SERVER2
|
|
-j1" > ~/.parallel/config
|
|
(echo 1; echo 1) | parallel -kv hostname\; echo | sort
|
|
rm ~/.parallel/config
|