Title: This is a neat trick I&#x27;ve used to write self-extracting software or scripts that extract files from archives by just using<p><pre><code>    tail -c &lt;number of bytes for the binary&gt; $0
</code></pre>
All you have to do is make sure you append an explicit &#x27;exit&#x27; to the end of your program before your new &#x27;data section&#x27;, so that bash won&#x27;t parse any of the &#x27;data section&#x27;.<p>One thing to bear in mind is that if you append binary data, it will be corrupted if you save it in most text editors so when I want to make changes I just delete all the binary and reappend it.
Upvote: