Tell HN: People forget that you can stick any data at the end of a bash script
If you care less about space efficiency and more about maintainability of the script, you can also encode the binary as base64 and put an<p><pre><code>  echo '...base64 data...' | base64 -d > somefile
</code></pre>
in your script.<p>Or add compression to reclaim at least some of the wasted space:<p><pre><code>  echo '...base64 gzipped data...' | base64 -d | gunzip > somefile
</code></pre>
Also note that bash accepts line breaks in quoted strings and the base64 utility has an "ignore garbage" option that lets it skip over e.g. whitespace in its input. You can use those to break up the base64 over multiple lines:<p><pre><code>  echo '
    ...base64 gzipped data...
    ...more data...
    ...even more data...
  ' | base64 -di | gunzip > somefile</code></pre>