2010-07-09 12:10:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-12-05 23:21:21 +00:00
|
|
|
rm -f ~/.parallel/will-cite
|
|
|
|
|
2010-09-05 10:22:08 +00:00
|
|
|
echo '### Test stdin goes to first command only ("-" as argument)'
|
|
|
|
cat >/tmp/parallel-script-for-script <<EOF
|
|
|
|
#!/bin/bash
|
2012-01-08 18:52:00 +00:00
|
|
|
echo via first cat |parallel --tty -kv 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
|
2011-01-17 12:38:58 +00:00
|
|
|
sleep 2
|
2010-09-05 10:22:08 +00:00
|
|
|
echo '### Test stdin goes to first command only ("cat" as argument)'
|
|
|
|
cat >/tmp/parallel-script-for-script2 <<EOF
|
|
|
|
#!/bin/bash
|
2012-01-08 18:52:00 +00:00
|
|
|
echo no output |parallel --tty -kv ::: 'echo a' '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
|
2010-09-14 16:37:26 +00:00
|
|
|
sleep 2
|