3 # SPDX-FileCopyrightText: 2021-2024 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
5 # SPDX-License-Identifier: GPL-3.0-or-later
7 SERVER1
=parallel-server1
8 SERVER2
=parallel-server2
11 SSHLOGIN1
=$SSHUSER1@
$SERVER1
12 SSHLOGIN2
=$SSHUSER2@
$SERVER2
16 echo '### Test --basefile with no --sshlogin'
17 echo | stdout parallel
--basefile foo
echo
19 echo '### Test --basefile + --cleanup + permissions'
20 echo echo script1 run
'"$@"' > script1
21 echo echo script2 run
'"$@"' > script2
22 chmod 755 script1 script2
23 seq 1 5 | parallel
-kS $SSHLOGIN1 --cleanup --bf script1
--basefile script2
"./script1 {};./script2 {}"
25 stdout
ssh $SSHLOGIN1 ls 'script1' ||
echo OK
26 stdout
ssh $SSHLOGIN1 ls 'script2' ||
echo OK
28 echo '### Test --basefile + --sshlogin :'
29 echo cat '"$@"' > my_script
31 rm -f parallel_
*.
test parallel_
*.out
32 seq 1 13 | parallel
echo {} '>' parallel_
{}.
test
34 ls parallel_
*.
test | parallel
-j+0 --trc {.
}.out
--bf my_script \
35 -S $SSHLOGIN1,$SSHLOGIN2,: "./my_script {} > {.}.out"
36 ls parallel_
*.
test parallel_
*.out | LC_ALL
=C
sort |
xargs cat
38 ## Broken since 2013-03-23
40 ## echo "### Test combined -X --return {/}_{/.}_{#/.}_{#/}_{#.} with files containing space"
41 ## stdout parallel -j1 -k -Xv --cleanup --return tmp/{/}_{/.}_{2/.}_{2/}_{2.}/file -S $SSHLOGIN2 \
42 ## mkdir -p tmp/{/}_{/.}_{2/.}_{2/}_{2.} \;touch tmp/{/}_{/.}_{2/.}_{2/}_{2.}/file \
43 ## ::: /a/number1.c a/number2.c number3.c /a/number4 a/number5 number6 'number 7' 'number <8|8>'
47 echo "### Here we ought to test -m --return {/}_{/.}_{#/.}_{#/}_{#.} with files containing space"
48 echo "### But we will wait for a real world scenario"