How to make an executable shell script macOS that can be used on any computer
<p>I have a shell file, and I need to make an executable that will work on <em>any</em> Mac without <code>chmod +x</code>, just by double clicking it. How can I do this? I've tried appify, but double clicking its result does not execute my file. I have also tried the solution presented in <a href="https://stackoverflow.com/questions/26465240/how-to-execute-a-shell-script-from-within-an-app-and-show-it-in-the-terminal">How to execute a shell script from within an app and show it in the terminal</a>, but this results in the error <code>Permission denied</code>.</p>

<p>The script I'm trying to make executable is:</p>

<pre><code>#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;&amp; pwd )"

cd $DIR

SLASH="/"

INFILE=`find $DIR -name "*.csv"`

DONE=`perl myfile.pl -i $INFILE -o output.csv -l $DIR$SLASH`

echo "File(s) are ready to use"

echo "Press [enter] to escape"

read terminate
</code></pre>