#! /bin/sh # This script writes tcb.h by dumping head.dgn # which is empty dgn file written by Microstation # and which contains TCB element on first 1536 bytes echo '/* DO NOT EDIT this file by hand. It is written by tcbdump */' > tcb.h echo 'static unsigned char tcb[] = {' >> tcb.h od -A n -t x1 -N 1536 -w8 -v ./head.dgn | sed -e 's/\([0-f][0-f]\)/0x\1,/g' | sed -e '$ s/,$//' >> tcb.h echo '};' >> tcb.h