#! /bin/bash sed -e 's/\(@....\) ..\(..\)/\1 \2/g' <$1 >bootl.hex sed -e 's/\(@....\) \(..\)../\1 \2/g' <$1 >booth.hex