2010-02-03 23:54:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-03-22 20:16:35 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2010-02-03 23:54:06 +00:00
|
|
|
# Test xargs compatibility
|
|
|
|
|
2016-08-13 17:11:15 +00:00
|
|
|
#rm -f ~/.parallel/will-cite
|
2013-12-05 23:21:21 +00:00
|
|
|
|
2017-01-01 11:42:52 +00:00
|
|
|
cd input-files/test15 || cd ../input-files/test15
|
2010-04-21 19:28:00 +00:00
|
|
|
|
2016-08-21 13:37:59 +00:00
|
|
|
echo 'xargs Expect: 3 1'
|
2010-06-12 23:24:25 +00:00
|
|
|
echo 3 | xargs -P 1 -n 1 -a files cat -
|
2010-09-05 10:22:08 +00:00
|
|
|
echo 'parallel Expect: 3 1 via psedotty 2'
|
|
|
|
cat >/tmp/parallel-script-for-script <<EOF
|
|
|
|
#!/bin/bash
|
2012-01-08 18:52:00 +00:00
|
|
|
echo 3 | parallel --tty -k -P 1 -n 1 -a files cat -
|
2010-09-05 10:22:08 +00:00
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/parallel-script-for-script
|
|
|
|
echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script /dev/null
|
|
|
|
sleep 1
|
|
|
|
|
2016-08-21 13:37:59 +00:00
|
|
|
echo 'xargs Expect: 1 3'
|
2010-06-12 23:24:25 +00:00
|
|
|
echo 3 | xargs -I {} -P 1 -n 1 -a files cat {} -
|
2010-09-05 10:22:08 +00:00
|
|
|
echo 'parallel Expect: 1 3 2 via pseudotty'
|
|
|
|
cat >/tmp/parallel-script-for-script2 <<EOF
|
|
|
|
#!/bin/bash
|
2012-01-08 18:52:00 +00:00
|
|
|
echo 3 | parallel --tty -k -I {} -P 1 -n 1 -a files cat {} -
|
2010-09-05 10:22:08 +00:00
|
|
|
EOF
|
|
|
|
chmod 755 /tmp/parallel-script-for-script2
|
|
|
|
echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script2 /dev/null
|
|
|
|
sleep 1
|
2010-06-12 23:24:25 +00:00
|
|
|
|
2014-07-14 16:25:45 +00:00
|
|
|
touch ~/.parallel/will-cite
|