title: Script command to manipulate binary file (on linux)
body: <p>I am looking for a mechanism to manipulate my eeprom image with a unique device id. I'd like to do this in a make file so that the device would automatically obtain a new ID and then update it to the data image, then flash it. In pseudocode:</p>
  
  <pre><code>wget http://my.centralized.uid.service/new &gt;new.id
  binedit binary.image -write 0xE6 new.id
  flash binary.image into device
  </code></pre>
  
  <p>So first we get an id into a separate file, then we overwrite the image (from given offset) with the contents of this ID file. Then flash. But how to do the second part? I looked up <em>bvi</em>, which seems to have some scripting abilities, but I did not fully understand it, and to be honest vi always gave me the creeps. </p>
  
  <p>Thanks for help beforehand!</p>