fi
}
-FROM=$( split_point "$FILE" $P $NUM )
-TO=$( split_point "$FILE" $(( P + 1 )) $NUM )
-SIZE=$(( TO - FROM ))
-
-tail -c +$FROM "$FILE" | head -c $SIZE
+split_point "$FILE" $P $NUM
#! /bin/sh
FILE=$1
for X in $( seq 0 39 ); do
- ( ./partition-pgn.sh "$FILE" $X 40 | ~/nmu/pgn-extract/pgn-extract -e -Wsessebin >> part-$X.bin 2>/dev/null ) &
+ (
+ START=$( ./find-pgn-split-point.sh "$FILE" $X 40 )
+ END=$( ./find-pgn-split-point.sh "$FILE" $(( X + 1 )) 40 )
+ ~/nmu/pgn-extract/pgn-extract --startpos $START --endpos $END -e -Wsessebin "$FILE" >> part-$X.bin 2>/dev/null
+ ) &
done
wait