mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
rm -f ~/.parallel/will-cite
|
|
|
|
resize=`resize`
|
|
|
|
# Disabled 2015-06-01
|
|
#
|
|
# echo '### Test stdin goes to first command only ("-" as argument)'
|
|
# cat >/tmp/parallel-script-for-script <<EOF
|
|
# #!/bin/bash
|
|
# echo via first cat |parallel --tty -kv cat ::: - -
|
|
# EOF
|
|
# chmod 755 /tmp/parallel-script-for-script
|
|
# echo via pseudotty | script -q -f -c /tmp/parallel-script-for-script /dev/null
|
|
# sleep 2
|
|
# rm /tmp/parallel-script-for-script
|
|
|
|
echo '### Test stdin goes to first command only ("cat" as argument)'
|
|
cat >/tmp/parallel-script-for-script2 <<EOF
|
|
#!/bin/bash
|
|
echo no output |parallel --tty -kv ::: 'echo a' 'cat'
|
|
EOF
|
|
chmod 755 /tmp/parallel-script-for-script2
|
|
echo via pseudotty |
|
|
script -q -f -c /tmp/parallel-script-for-script2 /dev/null |
|
|
perl -ne '/tange| .*/ or print'
|
|
sleep 2
|
|
rm /tmp/parallel-script-for-script2
|
|
|
|
echo "### Test stdin as tty input for 'vi'"
|
|
echo 'NB: If this changes and the diff is printed to terminal, then'
|
|
echo "the terminal settings may be fucked up. Use 'reset' to get back."
|
|
cat >/tmp/parallel-script-for-script3 <<EOF
|
|
#!/bin/bash
|
|
seq 10 | parallel --tty -X vi file{}
|
|
EOF
|
|
chmod 755 /tmp/parallel-script-for-script3
|
|
echo ZZZZ |
|
|
script -q -f -c /tmp/parallel-script-for-script3 /dev/null |
|
|
perl -ne '/tange| .*/ or print'
|
|
sleep 2
|
|
rm /tmp/parallel-script-for-script3
|
|
|
|
stdout parallel --citation < /dev/null |
|
|
perl -ne '/tange| .*/ or print'
|
|
|
|
touch ~/.parallel/will-cite
|
|
echo 1 > ~/.parallel/runs-without-willing-to-cite
|
|
# Clear screen
|
|
eval `resize`
|
|
seq $LINES | parallel -N0 echo > /dev/tty
|
|
reset
|