Compiling a bash/shell script to binary

Photo by Alexander Sinn on Unsplash

If we want to obfuscate what the script is doing we can compile it to binary using shc. As this is often not installed, we can add it using brew on mac or apt-get for Debian based Linux systems. Alternatively, we can install it from here (the github repository) and running make .

Start with your bash script

#!/bin/bash

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Daniel Ellis Research

Daniel Ellis Research

Research Software Engineer specialising in Data Visualisation with a touch of HPC. — PhD in Atmospheric Chemistry and Masters in Theoretical Physics.