comparison bin/cdbp.sh @ 364:bd931adc820b plus

working on new shrunk cdb en- and de-coding
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 07 Apr 2026 15:04:09 +0100
parents 3bd6378eb64e
children 1ff1bbf30472
comparison
equal deleted inserted replaced
363:d921f4a569d8 364:bd931adc820b
1 #!/usr/bin/bash 1 #!/usr/bin/bash
2 # One cdb pipeline step, doing 1/17th of the work 2 # One cdb pipeline step, doing 1/6 of the work
3 # Usage: cdbp.sh i 3 # Usage: cdbp.sh i
4 # where i is the 0-origin index of a 17th, so e.g. cdbp.sh 2 will run 4 # where i is the 0-origin index of a 6th, so e.g. cdbp.sh 2 will run
5 # test_cdbp.py ... ks_%d-%d.cdb 2 3 12 18 5 # test_cdbp.py ... ks_%d-%d.cdb lmh_%d-%d.cdb 34 50
6 i=$1 6 i=$1
7 k1=$((i >= 16 ? ((i * 6) - 1) : (i * 6))) 7 k1=$((i < 4 ? (i * 17) : (4 +(i * 16))))
8 k2=$((i < 15 ? (i + 1) * 6 : 90 + (i - 14) * 5)) 8 k2=$((i < 4 ? k1 + 16 : k1 + 15))
9 #k2=$((k2 > 100 ? 100 : k2)) 9 #echo $(printf lmh_%d-%d.cdb $k1 $((k2 - 1))) 1>&2
10 echo $(printf lmh_%d-%d.cdb $k1 $((k2 - 1))) 1>&2 10 #cat $(printf lmh_%d-%d.cdb $k1 $((k2 - 1))) > /dev/null
11 cat $(printf lmh_%d-%d.cdb $k1 $((k2 - 1))) > /dev/null
12 python3 -c 'import cdb_one;cdb_one.mainp()' lmh_%d-%d.cdb $k1 $k2 11 python3 -c 'import cdb_one;cdb_one.mainp()' lmh_%d-%d.cdb $k1 $k2
13 12