You can use script shell (bash).
You can use case;, in;, esac.
For example
Code:
#!/bin/bash
case $(var) in
a) echo "aaaaaaaaaaaa";;
b) echo "bbbbbbbbbbbb";;
c) echo "ccccccccccc";;
d) echo "dddd";;
*) echo "other";;
esac
the hexa file have one line or more than one line?