2010-06-04 00:16:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-01-24 01:02:07 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-2024 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-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'
|
2023-07-21 02:33:22 +00:00
|
|
|
seq 300000 | PARALLEL='--pipe -k' parallel wc
|
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
|