Create a file like clickable_file.command
above using TextEdit, or a different text editor of your choice. It should have the .command
extension. Save it on the Desktop (or wherever you want it to be located).
After creating it, you will need to run this command in a Terminal window:
chmod u+x ~/Desktop/command.command # substitute Desktop with the location you chose, if different
To get the Terminal window this opens to exit cleanly (and close itself), there seem to be a few options. This probably comes down to personal preference/knowledge.