Can I double click to run SH Files on Mac?
Hi,
At windows, we can use double click to run assigned file, does the method can be used in mac,such as sh file, or workflow file?
Thanks.
[Re-Titled by Moderator]
Hi,
At windows, we can use double click to run assigned file, does the method can be used in mac,such as sh file, or workflow file?
Thanks.
[Re-Titled by Moderator]
Normally you double-click a macOS executable within the Finder (whether it is a compiled app, or script). However, with some macOS security settings the executable may not run unless macOS is told it is safe to run that macOS executable file.
Even if a shell script is made executable, I have encountered times I cannot double-click the shell script to run it because double-clicking opens it in the text editor. For some reason macOS assigns extended attributes to the shell script file to cause it to open in a text editor. Once I remove those extended attributes (using the command line 'xattr') I am able to double-click the executable shell script & have it run. If you use a GUI app to edit the shell script, you will need to remove those extended attributes again before you can double-click the script to run it.
Normally you double-click a macOS executable within the Finder (whether it is a compiled app, or script). However, with some macOS security settings the executable may not run unless macOS is told it is safe to run that macOS executable file.
Even if a shell script is made executable, I have encountered times I cannot double-click the shell script to run it because double-clicking opens it in the text editor. For some reason macOS assigns extended attributes to the shell script file to cause it to open in a text editor. Once I remove those extended attributes (using the command line 'xattr') I am able to double-click the executable shell script & have it run. If you use a GUI app to edit the shell script, you will need to remove those extended attributes again before you can double-click the script to run it.
Not being familiar with Windows files, I will say that it takes a double click to open any file or app. You can easily check this by doing so. Keep in mind that there are Window files that a Mac can not open or run. You must install a Mac version if one is available.
Can I double click to run SH Files on Mac?