Change a Text File to Unix Executable File
Step 1: Open the terminal, type "chmod +x " (do not forget there is a space at the end, and do not press Enter yet)
Step 2: Drag the text file you want to change from the finder window and drop it to the end of this command line (the file path will show)
Step 3: Enter
Finally you will see the file format has been changed successfully.