title: How to write a binary file using Bash?
body: <p>My problem is that I need to create a file with this exact bytes: <code>48, 00, 49, 00</code>.</p>
  
  <p>I cannot use C, perl, other scripting language (the target is an embedded device). I tried this using awk, and in desktop it does work:</p>
  
  <pre><code># awk  'BEGIN{ printf "%c%c%c%c", 48, 00, 49, 00 }' | hexdump
  0000000 0030 0031                              
  0000004
  </code></pre>
  
  <p>However the target platform is running busybox v1.13.2 and this code does not work there. The awk version there does not output ascii "0" (all other values are ok).</p>
  
  <p>What are your recommendations?</p>