parallel/testsuite/tests-to-run/sem02.sh

19 lines
413 B
Bash
Raw Permalink Normal View History

2012-11-21 21:32:50 +00:00
#!/bin/bash
minipv() {
sleep=$1
while read line; do
echo "$line"
sleep $sleep
done
}
export -f minipv
2012-11-21 21:32:50 +00:00
echo '### Test id = --id `tty`'
parallel --id `tty` --lb --semaphore seq 1 10 '|' minipv 0.1
2012-11-21 21:32:50 +00:00
echo '### Test default id = --id `tty`'
parallel --lb --semaphore seq 11 20 '|' minipv 0.01
2012-11-21 21:32:50 +00:00
echo '### Test --semaphorename `tty`'
parallel --semaphorename `tty` --semaphore --wait
echo done