2010-10-26 23:50:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-12-26 22:29:28 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-2022 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
2021-03-22 20:16:35 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2017-01-06 18:10:20 +00:00
|
|
|
SERVER1=parallel-server1
|
2010-10-26 23:50:58 +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-10-26 23:50:58 +00:00
|
|
|
|
|
|
|
echo '### Test $PARALLEL_SEQ - local'
|
|
|
|
seq 1 20 | parallel -kN2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
|
|
|
|
|
|
|
|
echo '### Test $PARALLEL_SEQ - remote'
|
2020-08-07 20:20:30 +00:00
|
|
|
seq 1 20 | parallel -kN2 -S $SSHLOGIN1,$SSHLOGIN2 echo arg1:{1} seq:'$'PARALLEL_SEQ arg2:{2}
|
2010-10-26 23:50:58 +00:00
|
|
|
|
|
|
|
echo '### Test $PARALLEL_PID - local'
|
2010-11-13 13:57:39 +00:00
|
|
|
seq 1 20 | parallel -kN2 echo arg1:{1} pid:'$'PARALLEL_PID arg2:{2} | perl -pe 's/\d{3,}/0/g'
|
2010-10-26 23:50:58 +00:00
|
|
|
|
|
|
|
echo '### Test $PARALLEL_PID - remote'
|
2020-08-07 20:20:30 +00:00
|
|
|
seq 1 20 | parallel -kN2 -S $SSHLOGIN1,$SSHLOGIN2 echo arg1:{1} pid:'$'PARALLEL_PID arg2:{2} | perl -pe 's/\d{3,}/0/g'
|