annotate bin/cdb_chain.sh @ 288:d3fc7b5c73d0
park that, try fixed large buffer and large-enough min to ensure we always have a whole record in view
| author |
Henry S. Thompson <ht@inf.ed.ac.uk> |
| date |
Tue, 08 Apr 2025 16:06:33 +0100 |
| parents |
25d49e1f6c1d |
| children |
3bd6378eb64e |
| rev |
line source |
|
281
|
1 #!/usr/bin/bash
|
|
|
2 # Chain together n steps of test_cdbp
|
|
|
3 # Usage cdb_chain n
|
|
|
4 # First step takes stdin, intermediate steps use FIFOs, last step goes to stdout
|
|
|
5 export PYTHONPATH=~/lib/python/cc/lmh
|
|
|
6 n=$1
|
|
|
7 mkfifo from0
|
|
|
8 cat | { cdbp.sh 0 > from0 ; } &
|
|
|
9 seq 1 $((n - 2)) | while read i ; do
|
|
|
10 mkfifo from$i
|
|
|
11 cdbp.sh $i < from$((i - 1)) > from$i &
|
|
|
12 rm $from$((i - 1))
|
|
|
13 done
|
|
|
14 cdbp.sh $((n - 1)) < from$((n - 2))
|
|
|
15 rm from$((n - 2))
|